Created
June 8, 2018 10:09
-
-
Save Guley/c57e734aeb15324fd20cd6cd115cfe31 to your computer and use it in GitHub Desktop.
Use ckeditor for multiple texarea on same page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<textarea class="form-control category_content" name="category_content[1]" id="desc_1" required> | |
<textarea class="form-control category_content" name="category_content[2]" id="desc_2" required> | |
<textarea class="form-control category_content" name="category_content[3]" id="desc_3" required> | |
$('.category_content').each(function(e){ | |
CKEDITOR.replace( $(this).attr('id'), { | |
height: '400px', | |
toolbar: [ | |
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] }, | |
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Underline' ] }, | |
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ], items: [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock' ] }, | |
] | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment