Hi,

I've encountered a Problem when using ckeditor with media and the ckeditor mathjax addon.

ckeditor in combination with media works fine I can resize the image by accessing the image properties. But as soon as I active the mathjax addon a span(widget) is wrapped around the image preventing me from reaching the image properties thus I cant resize the image any longer. I have includes screenshots to demonstrate this.

CommentFileSizeAuthor
without_mathjax.png244.79 KBandrewtur
with_mathjax.png298.63 KBandrewtur

Comments

Andrew@Germany created an issue. See original summary.

andrewtur’s picture

Title: Cant resize images when using mathjax addon » Cant resize images with widget addon
andrewtur’s picture

Hi,

I've done some digging and found out something I thought was worth sharing.

I am using the media_ckeditor module for the ckeditor integration and I found this variable: "hasWidgetSupport" which defaults to false.
So if the widget addon is not enabled no widget(wrapping span) is render around the img which allows one to access the image properties as seen in the image without_mathjax.png. By enabling the widget addon (Mathjax requiers it) hasWidgetSupport is set to true and the widget will be render and you can not access the image properties any longer as seen in the screen with_mathjax.png. My temporary workaround was to comment out this line:
media_ckeditor/js/plugins/media/plugin.js Line 23

mediaPluginDefinition.hasWidgetSupport = typeof(CKEDITOR.plugins.registered.widget) != 'undefined';

by removing this line the else case in line 208 is used so everything should still work so now i can use media( and resize images) in conjunction with mathjax

Hope this helps someone having similar issues.

joseph.olstad’s picture

very good yes, I added a note to this in the documentation media recipe

mqanneh’s picture

+1

joseph.olstad’s picture

You must be referring to the ckeditor widget library plug-in, not module, I do not see this module.