CKEditor stripping FAQ template markup - problem and solution

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
7/29/2014 4:44:29 AM
Gravatar
Total Posts 128

CKEditor stripping FAQ template markup - problem and solution

This started off as a question, then I found the answer (noted below), so posting anyway in case others have the same problem.

The problem:

I have an HTML content feature that was created using the out-of-the-box FAQ template. Now when I try to edit it with the WYSIWYG editor (CK) the special tags are all replaced with simple paragraphs. This is not happening on your demo site, so it must be some setting or config difference, but I'm not aware of having changed anything since this last worked.

I've upgraded to mojoPortal 2.4.0.4 with CKEditor 443 but it made no difference. I am seeing this in both IE11 and Chrome.

On clicking "edit" Fiddler shows this request:

http://www.gisquirrel.com/HtmlEdit.aspx?mid=7&pageid=57

which includes this content in the response, showing the special FAQ markup:

<div id="ctl00_mainContent_edContent">

<textarea name="ctl00$mainContent$edContentinnerEditor" rows="10" cols="70" id="ctl00_mainContent_edContentinnerEditor" style="height:350px;">

&lt;dl class=&quot;faqs&quot;&gt;

&lt;dt&gt;How is the data stored?&lt;/dt&gt;

etc etc

&lt;dt&gt;Can I use the ArcGIS Toolbox tools for geoprocessing GISquirrel layers?&lt;/dt&gt;

&lt;dd&gt;Yes, but please read &lt;a href=&quot;/geoprocessing&quot; &gt;this guidance&lt;/a&gt;.&lt;/dd&gt;

&lt;/dl&gt;

</textarea>

</div>

however when the editor clicks into place, the content has been changed to this:

<p>How is the data stored?</p>

etc etc

<p>Yes, but please read <a href="/geoprocessing">this guidance</a>.</p>

The solution:

I have now found this is related to the changes from CKEditor 4.1 described here http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter

combined with the fact that our site was using a custom CKEditor configuration (e.g. <add key="CKEditor:ConfigPath" value="~/ckeditor-myconfig.js"/> ).

Switching to the default config fixed the problem, so I can now re-modify the default config to our purposes.

 

You must sign in to post in the forums. This thread is closed to new posts.