Creating ckeditor


/ Published in: JavaScript
Save to your folder(s)

Creating ckeditor, setting its height and configuring its maximum width.


Copy this code and paste it in your HTML
  1. $("#currentContent").html("<textarea id='editor'>" + HTMLContent + "</textarea>");
  2.  
  3. var editor = CKEDITOR.instances['editor'];
  4. if (editor) { editor.destroy(true); }
  5.  
  6. editor = CKEDITOR.replace('editor',
  7. {
  8. height: 400
  9. });
  10. CKEDITOR.config.resize_maxWidth = $("#editor").parent().width();

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.