H5PEditor to edit source html
Submitted by Julian Strecker on Tue, 01/10/2017 - 10:47
Forums:
Hi there,
I'm trying to add support for mathematical Functions to the editor. Since the ways described here are not working for me, I want to enter html as it into the editor. How can I enable the source-code-editing-switch.
Whats the right way of doing this?
Thanks in advance
icc
Wed, 01/11/2017 - 13:27
Permalink
I believe you will have to
I believe you will have to follow the procedures described in the comments on this page. The reason for this is that any code that's added to the editor that hasn't been 'whitelisted' by the plugin will automatically be removed when saving. This is for security reasons, sorry!
Julian Strecker
Wed, 01/11/2017 - 14:42
Permalink
Thanks so far icc!So, is it
Thanks so far icc!
So, is it true, that even if we don't think of MathJax for a moment there is no way of enabling the editing html-sourcecode in the ckeditor of h5p? So for example even adding a certain <div class="class">Styled div</div> isn't meant to be available?
icc
Wed, 01/11/2017 - 15:00
Permalink
You can enable any CKEditor
You can enable any CKEditor compatible plugin by adding it to the CKEditor Config. The easiest way of doing this is to include a JS file from your plugin or theme that modifies the config. For an example of how this can done, see the last points in the WYSIWYG Text Editor Buttons page. I believe adding 'sourcedialog' to config.extraPlugins should do the trick.