I use CKeditor for my CMS. However, this CMS uses custom variables to display values and apply some logic. An example would be:
<ul> <li>one</li> [[if (val==true)]] <li>two<li> [[endif]] <li>three</li> <ul>
However when I save this HTML source my CKeditor automatically wraps my logic in in li-tags like this:
<ul> <li>one</li> <li>[[if (val==true)]]</li> <li>two<li> <li>[[endif]]</li> <li>three</li> <ul>
I read the docs of course and tried a whole bunch of configs, however this auto-wrapping seems to be unable to disable. Help would be greatly appreciated
Have you tried playing around
Have you tried playing around with ProtectedSource.
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Hi sebstefanov,
Hi sebstefanov,
Thanks a lot for your reply. Yes I tried it, but I figured it wasn't what I was looking for because I was (probably too) convinced my regex worked.
I tried config.protectedSource.push( /^\[\[(.*)\]\]$/ );
But still my custom logic was wrapped in list-tags. Is that my regex that isn't sufficient?
ProtectedSource only removes
ProtectedSource only removes the custom code that matches the regex from the WYSIWYG, it doesn't prevent the CKEditor from wrapping my custom code in list tags.
If there's any way to disable this automatic behaviour (as in wrapping elements for you) as a whole I'd sure like to know. Or if I can only detect this behaviour I might be able to hack my way around it, but for now I'm stuck and I'm afraid I must refrain from using the CKeditor in my CMS.
Kind regards,