Please note that the forum isn't realy used anymore.

If you have questions, want support or just simply want to talk to us you can find us on slack.

 

Code in CKEditor

Hey all,

I am not really sure how I can include code inside the WYSIWYG. Whenever I try and add some Javascript or XML code snippets it just gets hidden on the blog page.

Any idea how I can fix this?

Maybe try a plugin for CKEditor? Something like this but I don't have experience using it. I have tried several other plugins for ckeditor before, but not for code. Make sure though that the plugin is compatible with CKEditor version 3.6.6 (the one used in forkcms). Copy the plugin to the plugins folder of ckeditor and edit /src/Backend/Core/Js/backend.js to activate the plugin and maybe add a button to the toolbar.

If you want to add some javascript, maybe you can just open the "code" view and add some code like:

<script>
    window.alert("hi");
</script>

This snippet gets executed if I add it through the code view...

Comment

The forum is deprecated in favor of our Slack channel, which provides real-time support for your issues.

Join us on Slack here: https://fork-cms.herokuapp.com/