Note that there are some explanatory texts on larger screens.

plurals
  1. POCant make CKEditor InsertHTML work on IE 8
    text
    copied!<p>this is my textarea prepared for ckeditor to launch on:</p> <pre><code>&lt;textarea name="Message" id="RFMessage lol" rows="4" class="ckeditor" onkeydown="if(this.value.length&amp;gt;=1024)this.value=this.value.substring(0,1023);"&gt; &lt;/textarea&gt; </code></pre> <p>Than I have this html:</p> <pre><code>&lt;textarea id="message" class="message hide" &gt;WORLDWIDE,Any&lt;/textarea&gt; </code></pre> <p>What I need to do is to make JS work on .message div to get rid of ",Any" and then put the clean value of only "WORLDWIDE" to #RFMessage div</p> <p>Since I dont know how to run custom JS inside ckeditor I'm using their predifined API from here: <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html" rel="nofollow">http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html</a> </p> <p>I use InsertHTML to take the value and insert it.</p> <p>This is my whole JS:</p> <pre><code>&lt;script&gt; $(".message").each(function() { $(this).html($(this).html().replace(/,Any/g,"")); $(this).html($(this).html().replace(/Any,/g,"")); }); &lt;/script&gt; &lt;script&gt; CKEDITOR.on( 'instanceReady', function( ev ) { var oEditor = CKEDITOR.instances.RFMessage; var value = document.getElementById('message').value; oEditor.insertHtml(value); }); &lt;/script&gt; </code></pre> <p>Of course CKEditor have to be loaded with this whole thing.</p> <p>It all works fine on Chrome and Firefox but this doesn't work on IE8</p> <p>I've constructed the script according to this CKEditor sample of using their API: <a href="http://nightly.ckeditor.com/7493/_samples/api.html" rel="nofollow">http://nightly.ckeditor.com/7493/_samples/api.html</a></p> <p>Any ideas what could be causing this not to work on IE8? I've also tried researching their forum for any IE8 related bugs but couldn't find any. Maybe I'm simply missing something in the script?</p> <p>Thanks</p>
 

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