Forum list » Templates »
Changing default image width in TinyMCE editor
Pages:  1
(12 posts)

Changing default image width in TinyMCE editor

Hi,

I've tried to determine how to change the default image width used by Webnodes+TinyMCE during HTML field inserts, which seems to be set to 300px when you first insert an image by reference or copy.

I've done some research and it seems like you can inject your own default width properties in TinyMCE. However in the Webnodes editor interface, a image element with URL is generated directly from CMS, with its respective ImageAdjustments applied (x = 300). Height/with img properties are also applied to the img element.

 

Do any of you know how I can override default image width?

Best regards, 

Robin

(144 posts)

Re: Changing default image width in TinyMCE editor

Hi!

Unfortunately, the 300px width is hard-coded into the workflow that inserts the image tag into the editor. Could you explain the use-case where you would need to set another width?

Would you need to set the different width per html property, or could it be a global value?

 

Vidar

 

(12 posts)

Re: Changing default image width in TinyMCE editor

Hi!

A user story could be like this:

As an editor, I always insert our standard size images into our articles. It is always {x} px wide. 

Since the value is hard-coded to 300px, I have to manually resize the image every time I insert an image

 

In my user story, this could be a global value applied installation-wide. 

(12 posts)

Re: Changing default image width in TinyMCE editor

Hi again, 

Is there any possibility that this will be possible to do in future versions of the editor?

In my case, the editor inserts a lot of standard size images every day, so they would be really happy if they could ommit resizing the image after every insert. A global tweakable standard size for image inserts would be much welcomed. 

(104 posts)

Re: Changing default image width in TinyMCE editor

Hi, we see the need for this too! 

I'm adding the possibility set the default image width as a setting in web.config in a new build of Webnodes CMS later today. 

    <add key="WAF.HtmlEditorDefaultMediaWidth" value="300px" />

 

(104 posts)

Re: Changing default image width in TinyMCE editor

Build 1791  includes this option now.

Add WAF.HtmlEditorDefaultMediaWidth to web.config to change default value of 300

(12 posts)

Re: Changing default image width in TinyMCE editor

Thanks a lot, Ole. 

This will help the editors in their daily editing routines.