Try our conversational search powered by Generative AI!

How to exclude width/height from tinymce insert image function?

Vote:
 

We have a responsive site..and can not really enjoy they attributes that comes with the tinymce image insert button... 

Is there any way to get rid of it?

#152329
Edited, Aug 24, 2016 12:16
Vote:
 

You should be able to use the valid_elements property in a TinyMCEPluginNonVisual. There you can make sure that the TinyMCE-instance removes height and width by itself.

It's probably wise to strip them out using Save events on the server side as well. Then you won't get any surprises if for example someone starts saving HTML from some source programatically.

#154877
Aug 31, 2016 21:56
Vote:
 

Not exactly what I want :-)

I want to be able to use width and hight (manually), but the button itself should not inject the attributes.

How can I alter the behaviour of the button?

#154883
Sep 01, 2016 8:52
Vote:
 

OK, after 7.6 it's hard to "hack" the original plugin so best way is to copy it  as your own plugin, maybe an option could be to work some URL rewrites and catch the script in question and just make a little modification.

The documentation have some info: http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-CMS/9/Editing/Customizing-the-TinyMCE-Editor/

#154898
Sep 01, 2016 10:44
Vote:
 

Fredrik, did you solve this? to no fill in automatically the fields... 

My customer gets totaly wrong propotions too... 

#191545
Apr 25, 2018 9:53
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.