Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.


Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Insert Image in CMS (tinymce) SS2.2

Go to End

17 Posts   5675 Views


9 December 2007 at 2:34am Community Member, 501 Posts

When inserting images with tinymce in SS2.2 I'm getting weird results.

Just inserting it from the right 'image' tool setting style to 'left with wrap' description to 'test' gives me:

<img class="left" src="assets/Uploads/_resampled/ResizedImage333222-image.jpg" alt="test" title="null" align="null" height="222" hspace="null" vspace="null" width="333" />

- Title: null??
- What's all that hspace vspace crap doing in there? (null is not even an allowed value).

Then I noticed that I could right-click on the image in the content area and get a popup.
So I cleared the 'null' values, just erased them.

Hooray vspace - hspace all were gone.

But : the class was gone too, and the title had changed from null to undefined...

Isn't there a way to just have a title, an alt and a class without all the other crap and without having to right-click?

( and without having to break into the core again making upgrading a pain in the .. )

I'd rather have a simple but correct tool than 10000 fancy features that get messy.



9 December 2007 at 2:49am Community Member, 787 Posts

I can confirm this behavior. Dio : did you already put it into TRAC ?


9 December 2007 at 2:52am Community Member, 501 Posts

No, noticed it just 5 minutes ago..

( I'm building my second SS-site, but now for someone else who will want to insert images...)

Shall I make a ticket for it?

I really need this to be working correct.


9 December 2007 at 2:53am (Last edited: 9 December 2007 3:20am), Community Member, 501 Posts

I wonder if this is SS-behaviour or just a 'defect' of tinymce?
If it's tinymce, I think we're f*d.


9 December 2007 at 3:39am Community Member, 501 Posts

A possible solution for the hspace vspace align - stuff disappear:

Erase hspace - vspace - align in cms/javascript/tinymce.template.js

That would make the right click - image properties quite unuseful and broken, but leaves out the crap.

Doesn't solve the 'title' issue though.


9 December 2007 at 4:11am Community Member, 501 Posts

Maybe 'title' should just be left out too... An alt on an image is usually enough.


12 December 2007 at 7:45am Community Member, 4 Posts

The solution:

find jsparty/tiny_mce_improvements.js

locate the line (665 here):

      TinyMCE_AdvancedTheme._insertImage(relativeHref, altText, 0, null, null, $('Form_EditorToolbarImageForm_Width').value, $('Form_EditorToolbarImageForm_Height').value, null, null, null, null, cssClass);

and replace it with

      TinyMCE_AdvancedTheme._insertImage(relativeHref, altText, 0, null, null, $('Form_EditorToolbarImageForm_Width').value, $('Form_EditorToolbarImageForm_Height').value, null, altText, null, null, cssClass);

(the third last null (=title) is replaced with the altText).


12 December 2007 at 7:58am Community Member, 501 Posts


Alternatively, title can just be left out of line 44 in cms/javascript/tinymce.template.js
(together with hspace, vspace, ... )

(That removes the title entirely though.)

Go to Top