Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You could try subscribing to <code>instanceReady</code> event this way: </p> <pre><code>CKEDITOR.instances.editor.on("instanceReady", onInstanceReadyHandler) </code></pre> <p>However, the <code>editor</code> instance must have been already created by then (inspect <code>CKEDITOR.instances</code> in the debugger). </p> <p>I'm a bit confused about the difference between <code>editable</code> and <code>editor</code>. Could you show the fragments of your code where <code>this.editor</code> and <code>this.editable</code> get assigned? </p> <p><strong>[EDITED]</strong> I guess I see what's going on. <code>CKEDITOR</code> is a global object, you may think of it as of a class which holds all CKEDITOR instances. Trying to handle events with <code>CKEDITOR.on</code> isn't right, you need to do it on a specific instance (like I've shown above). I assume, <em>"editor"</em> is the ID of your parent element you want to attach a <code>CKEDITOR</code> instance to (please correct me if I'm wrong). I'm not familiar with Backbone, but usually it's done with <a href="http://docs.ckeditor.com/#!/api/CKEDITOR-method-replace" rel="noreferrer">replace</a>:</p> <pre><code>var editorInstance = CKEDITOR.replace("editor", { on: { instanceReady: function(ev) { alert("editor is ready!"); }}}); </code></pre> <p>Here we attach a new instance of CKEDITOR to the <code>editor</code> parent element and subscribe to the <code>instanceReady</code> event at the same time. The returned object <code>editorInstance</code> should provide all the <a href="http://docs.ckeditor.com/#!/api/CKEDITOR.editor" rel="noreferrer">APIs</a> you may need, including <a href="http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setReadOnly" rel="noreferrer">setReadOnly</a>. You could also access it through the global <code>CKEDITOR</code> object using the parent element ID, i.e. <code>CKEDITOR.instances.editor</code>. On the other hand, <a href="http://docs.ckeditor.com/#!/api/CKEDITOR.editable" rel="noreferrer">editable</a> is rather a service object available on <a href="http://docs.ckeditor.com/#!/api/CKEDITOR.editor" rel="noreferrer">editor</a>. I can't think of any specific case where you might need to use it directly.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload