Re: tinymce: style for IMG tag

Steve Switzer <[email protected]>
Newsgroups gmane.comp.cms.xaraya.user
Organization Xaraya
Message-ID <[email protected]>
Looking at the image diaglog box, I see that this is the source file:

/modules/tinymce/xarincludes/themes/advanced/image.htm

I think that's the problem!!! It should, I think, be this file instead:

/modules/tinymce/xarincludes/plugins/advimage/image.htm

Is this because I just have the standard "image" button? I've tried 
adding in a button called "advimage" but that does nothing.  So, it 
seems that I'm not using the advimage plug-in... or for that matter, I'm 
not using the advlink plug-in like I thought I was.

- Steve.




Steve Switzer wrote:
> Jo -- Thanks for the quick response!
> 
> It's not working, though :(
> 
> I've made the change to the config using the "custom config options" so 
> that my config looks like this:
> 
> tinyMCE.init({
>  mode : "specific_textareas",
>  theme : "advanced",
>  document_base_url : "http://www_test.myra.com/index.php",
>  editor_selector : "mceEditor",
> content_css :
> "http://www_test.myra.com/siteComponents/2006/styleFontsAndColours.css",
>  browsers : "msie,gecko",
>   ask : "true",
>  inline_styles : "true",
>   button_tile_map : "true",
>  cleanup: "false",
>  apply_source_formatting: "true",
>  theme_advanced_toolbar_location: "top",
>   theme_advanced_statusbar_location: "bottom",
>   theme_advanced_resizing : "true",
>  plugins :
> "searchreplace,print,advimage,advlink,table,paste,preview,fullscreen,save",
>   theme_advanced_buttons1_add : "search,replace",
>   theme_advanced_buttons2_add : "print,fullscreen,preview,save",
>   theme_advanced_buttons3_add : "tablecontrols",
>   theme_advanced_blockformats : "p,pre,h1,h2,h3,blockquote",
>  extended_valid_elements :
> "a[name|href|target|title|onclick],img[class|style|src|border=0|alt|title|h
> space|vspace|width|height|align|onmouseover|onmouseout]",
>   advimage_styles : "leftInset=left;rightInset=right",
>  file_browser_callback : "xarfilebrowsercallback",
>  entity_encoding : "raw",
>  language : "en"
>  });
> 
> I'm assuming that what I should see is a "styles" dropdown in the image 
> dialog box... but that's not showing up.  I see:
> 
> - Image URL
> - Image description
> - Alignment
> - Dimensions
> - Border
> - Vertical space
> - Horizontal space
> 
> I'm almost thinking that I don't have the advimage plugin installed 
> properly.  In reading the plugin documentation, I see "Copy the advimage 
> directory to the plugins directory of TinyMCE 
> (/jscripts/tiny_mce/plugins)" as the first step.
> 
> I'm a bit confused by that:
> 
> 1) It says that for all the plugins, but I've never done so and other 
> plugins seem to work fine without me having to copy any plugin code.
> 2) I've found the advimage directory, but don't know exactly where I 
> would copy it to!  Do I need to create a /jscripts/tiny_mce/plugins 
> directory?
> 
> Thanks, Steve.
> 
> jojodee wrote:
> 
>> Hi Steve
>>
>> Yes the image plugin has it's own config option for styles. See the 
>> following URL in your site if you have tinymce installed: 
>> modules/tinymce/xarincludes/docs/plugin_advimage.html
>>
>> " advimage_styles : This option should contain a semicolon separated 
>> list of class titles and class names separated by =. The titles are 
>> the ones that get presented to the user in the styles drop down list 
>> and and the class names is the classes that gets inserted."
>>
>> There should be some good documentation on the plugins for optional 
>> settings. These settings can be added in your tinymce GUI by going to:
>>
>> Advanced config tab -> Custom config options
>>
>> And adding any options there as per instructions.
>>
>> Jo
>>
>> "Steve Switzer" <[email protected]> wrote in message 
>> news:[email protected]...
>>
>>> I've installed the tinymce module so that my less experienced users 
>>> can more easily edit their own pages.  Everything is going fine, 
>>> except that I don't seem to be able to apply a style to an image.
>>>
>>> I've got a css style defined as:
>>>
>>> ".left { float:left; margin:10px; margin-left:0px;}"
>>>
>>> which I usually apply to either DIV or IMG elements.
>>>
>>> The style "left" does show up in the list of available styles when 
>>> editing using tinymce, and I can successfuly apply it to DIV or P 
>>> tags, but not to images!
>>>
>>> I should say _new_ images in a page, as existing images that I've 
>>> inserted into a page (using normal html editing) can be of classified 
>>> as "left", and Tinymce says down at the bottom of the editor that 
>>> they're "img.left".
>>>
>>> But I can't apply this style to an image by selecting the image and 
>>> then selecting "left" from the dropdown list of styles.
>>>
>>> NOTE: other styles that I've defined have the same problem... I can't 
>>> apply them to images.
>>>
>>> I have the "advimage" plug-in loaded, and it works well.  I've 
>>> followed the advimage instructions and added 
>>> "img[class|style|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout]" 
>>> to the list of additional tags.
>>>
>>> Versions:
>>> xaraya 1.1.2
>>> tinymce 1.1.1
>>>
>>> Thanks, Steve. 
>>
>>
>>
>>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.