H5PEditor to edit source html

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's picture

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!

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's picture

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.