Asynchronously load () loads the ckeditor Editor

Source: Internet
Author: User

The ckeditor editor is loaded asynchronously. Note:

1. ckeditor undefined: ckeditor. JS is not loaded.

Solution:

1. Place the JS file on the parent page

<SCRIPT src = "http://www.cnblogs.com/../Content/ckeditor/ckeditor.js" type = "text/JavaScript"> </SCRIPT>
<SCRIPT src = "http://www.cnblogs.com/../Content/ckeditor/ckfinder/ckfinder.js" type = "text/JavaScript"> </SCRIPT>

2. For the first request to generate an editor, you must destroy the editor generated last time and regenerate the new editor.

<Textarea id = "  Content  " Rows = "  6  " Cols = "  10 " > </Textarea> <SCRIPT type = "  Text/JavaScript  " > Jquery (function (){  //  300 pop-up window Loadck ( 300  ) ;}); Function loadck (HH ){  //  Load ckeditor  //  Determine whether content exists             VaR  Editor;  If (! Ckeditor. Instances. Content ){  VaR Editor = ckeditor. Replace ( '  Content  ' , {Height: 300  });}  Else  {Addckeditor (  "  Content "  , HH );}}  //  New ckeditor  Function addckeditor (ID, HH ){  VaR Editor2 = Ckeditor. Instances [ID];  //  Destroy the editor content, and then add              If (Editor2) editor2.destroy ( True  ); Editor = Ckeditor. Replace (ID, {Height: hh });} </SCRIPT>

View code

Reference: http://blog.sina.com.cn/s/blog_7795200201013cjt.html

Second: Lang. contextmenu. options' is null or not an object.

Solution: substantive ckeditor JS file reference

1. Modify the official ckeditor. JS, so that some configurations are not deleted.

2. Is the ckeditor. js path correct?

Third: ckeditor. js file configuration details

Reference: http://blog.csdn.net/yangchaofeng1229/article/details/6723235

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.