Welcome Guest, Not a member yet? Register   Sign In
Need to add Textarea with Visual Editor
#13

(This post was last modified: 10-31-2019, 01:21 AM by xaibi.)

(10-30-2019, 12:06 PM)InsiteFX Wrote: If you need an editor download CKEditor it works with the textarea and only needs one thing to link it.

1) Include ckeditor.js in the head section of your code:

Code:
<!-- make sure the src path points to your copied ckeditor folder -->
<script src="ckeditor/ckeditor.js"></script>

2) Create a text area for the editor in the body section followed by your CKEditor instance:

Code:
<!-- creating a text area for my editor in the form -->
<textarea id="myeditor" name="myeditor"></textarea>

<!-- creating a CKEditor instance called myeditor -->
<script type="text/javascript">
    CKEDITOR.replace('myeditor');
</script>

Very easy to add it to CodeIgniter.


well i did this and its not working...

Code:
    <script src="https://cdn.ckeditor.com/4.13.0/standard/ckeditor.js"></script>

And this is other
Code:
<textarea rows="6" placeholder="Type Your Objective" class="form-control" value="<?=$a->description?>" name="objective_descriptions[]" /><?=$a->description?></textarea>
                <script>
                        CKEDITOR.replace( 'objective_descriptions[]' );
                </script>


I think there is an issue with all code please check my current code. remove + icon from the code and make it a single Textarea box code.

When I save data in my textarea from the database, my textarea will work fine. But when I remove the data from textarea then it will hide. And if I want to show textarea then I need to add data through a database.
Reply


Messages In This Thread
RE: Need to add Textarea with Visual Editor - by xaibi - 10-31-2019, 01:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB