Images in Rich Text Editor - DragQuestion
Submitted by supriyarajgopal on Wed, 08/24/2016 - 14:27
Forums:
Hi,
I am trying to tweak the H5P.DragQuestion library to support images in the rich text editor of Advanced Text using hook_h5p_semantics_alter().
If I add the 'img' tag to the 'tags' array, the option to embed an image is not appearing. Below is my code:
if($machine_name == 'H5P.AdvancedText') array_push($semantics[0]->tags,'img');
Is it not permitted to add <img> to Advanced Text or am I doing something wrong?
Kindly advise.
Regards,
Supriya Rajgopal
thomasmars
Thu, 08/25/2016 - 09:50
Permalink
Hi Supriya,
I suspect this is because the CKEditor in "H5P Core" is built without the "Image" plugin. To get this feature you have several alternatives:
I think #3 is probably the most correct approach, but with compelling arguments for adding image to ckeditor tool, you might be able to push it through.
Thomas