Using TinyMCE if I Add/Edit a graphic to a body of text, the dialogue allows me to specify a CSS style to it, for example to set a top margin. However, I can't access the MCE dialogue for a TV image.
Our ModX setup has a fair number of partial page (small) Templates which consist of template variables, say, which support a News Headline, News Blurb, and a Graphic associated with that news item. The MCE editor is available to add text, and if required, to add a graphic within that block of text. If I were adding such a graphic I have the full TinyMCE dialogue available.
However, the Template Variable also contains an input area which is only supported by the TinyMCE's browser, and not the full MCE editor dialogue which is very rich and allows CSS styles to be entered. Does anyone know how this type of image dialogue can be interfaced in such a way that A CSS style can be entered?
Whenever I explore one of these partial page templates with Chrome or Firefox's Inspector, it shows me CSS Styles that are specified for these graphics and yet I can't locate any ModX element or resource that specifies these styles. They're not coming from a CSS stylesheet.
Any insight would be very much appreciated.
Thanks ... Sam
Hi which TinyMCE extra are you using? Try to avoid the old one.
I'm not sure exactly what you mean. If you're trying to insert an image into the TinyMCE editor directly, you don't need to use a TV, just link directly to where the image is stored.
Also an image TV would only store the uri to that same stored image, so you shouldn't be trying to link to a TV from a RTE. Apologies if I've completely misunderstood.
RE:samg
Whenever I explore one of these partial page templates with Chrome or Firefox's Inspector, it shows me CSS Styles that are specified for these graphics and yet I can't locate any ModX element or resource that specifies these styles. They're not coming from a CSS stylesheet.
Template variable that takes in plain old text (image location) cannot be enhanced by TinyMCE.
Check the Resource MODX Template to add or edit existing image classes.
TinymceWrapper: Complete back/frontend content solution.
Harden your MODX site by
passwording your three main folders:
core, manager, connectors and renaming your
assets (thank me later!)
5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
I'am using the extra TinyMCE Rich Text Editor by John Peca and when inserting an image in a TV with RTE I can add style to the image.
Do you need more CSS styling options?
Codeplaza Webdesign: for professional websites at low cost
Sam, could it be a workaround for you to add another TV where you put styling code in it? Assuming you want to add different styling to different images. When you have the same styling to all images you provide by the TV you can add styling by setting the type to image in the output options of the TV.
[ed. note: donquicky last edited this post 9 years, 9 months ago.]
Codeplaza Webdesign: for professional websites at low cost
Hi Sam,
I looked in the inspector and as far as I can see these style has been generated by JQuery script loaded in the
edlaw.js script.
img.setStyle('margin-top', (h-h1)+'px');
Could that be the cause?
Codeplaza Webdesign: for professional websites at low cost