Page 1 of 1

tinymce init "imagemanager"

PostPosted: Wed Jun 10, 2009 4:31 pm
by mikewassil
This is a formatting issue I need help to resolve. I'm using TinyMCE as the editor along with the imagemanager plugin. It took awhile, but I've finally gotten the thing to work and upload images correctly. However, upon insert into the document, imagemanager inserts a thumbnail rather than the full image. According to the Moxie support forum this behaviour can be changed by adding the following to the TinyMCE init in fields.ini:

imagemanager_insert_template : '<img src="{$url}" width="{$custom.width}" height="{$custom.height}" />'

However, I've haven't been able to figure out how to format it as a widget attribute. I've tried the following to no avail:

1.
widget:imagemanager_insert_template = <img src="{$url}" width="{$custom.width}" height="{$custom.height}" />

2.
widget:theme_advanced_imagemanager_insert_template = <img src="{$url}" width="{$custom.width}" height="{$custom.height}" />

What do I need to do here? Thanks.

Mike

PostPosted: Fri Jun 12, 2009 8:00 am
by shannah
Use single quotes:
Code: Select all
widget:imagemanager_insert_template = "<img src='{$url}' width='{$custom.width}' height='{$custom.height}' />"

PostPosted: Fri Jun 12, 2009 1:58 pm
by mikewassil
shannah wrote:Use single quotes:
Code: Select all
widget:imagemanager_insert_template = "<img src='{$url}' width='{$custom.width}' height='{$custom.height}' />"


Thanks Steve. I tried this:
Code: Select all
widget:imagemanager_insert_template = "<img src='{$url}' width='{$custom.width}' height='{$custom.height}' />"

AND this:
Code: Select all
widget:theme_advanced_imagemanager_insert_template = "<img src='{$url}' width='{$custom.width}' height='{$custom.height}' />"

Neither way works. When I look at the page source the code line is not showing. But at least Xataface isn't crashing! So we're making progress. :)

Anything else you can suggest? Thanks.

Michael

PostPosted: Fri Jun 12, 2009 3:31 pm
by shannah
Perhaps this feature is only available in a newer version of tinymce. You may try downloading the latest tinymce and replacing your current tinymce folder with it. (located in xataface/lib).

-Steve

PostPosted: Fri Jun 12, 2009 3:51 pm
by shannah
Oh... scratch that. What you need to do is add support for this attribute by altering line 35 of HTML/QuickForm/htmlarea.php to include the names of these attributes.

And if that doesn't do it you may still need to upgrade to latest TinyMCE if the version budled with xataface doesn't support this attribute.

PostPosted: Sat Jun 13, 2009 10:32 am
by mikewassil
shannah wrote:Oh... scratch that. What you need to do is add support for this attribute by altering line 35 of HTML/QuickForm/htmlarea.php to include the names of these attributes.

And if that doesn't do it you may still need to upgrade to latest TinyMCE if the version budled with xataface doesn't support this attribute.


Thanks very much Steve! I finally got it working.

1. I added the following to HTML/QuickForm/htmlarea.php:

'theme_advanced_imagemanager_insert_template'

2. I added the following to my tinyMCE init:

widget:theme_advanced_imagemanager_insert_template = "<img src='{$url}' width='{$custom.width}' height='{$custom.height}' />"

3. I replaced Xataface version of TinyMCE (2.0.5.1) with the latest and greatest version (3.2.4.1).