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.

Archive /

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
Reply


17 Posts   5731 Views

Avatar
dio5

Community Member, 501 Posts

9 December 2007 at 2:34am

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.

cheerz

Avatar
Fuzz10

Community Member, 787 Posts

9 December 2007 at 2:49am

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

Avatar
dio5

Community Member, 501 Posts

9 December 2007 at 2:52am

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.

Avatar
dio5

Community Member, 501 Posts

9 December 2007 at 2:53am

Edited: 09/12/2007 3:20am

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

Avatar
dio5

Community Member, 501 Posts

9 December 2007 at 3:39am

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.

Avatar
dio5

Community Member, 501 Posts

9 December 2007 at 4:11am

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

Avatar
Maarten

Community Member, 4 Posts

12 December 2007 at 7:45am

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).

Avatar
dio5

Community Member, 501 Posts

12 December 2007 at 7:58am

Nice.

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