-
☆ A M B ☆
- 450 Posts
In the RTE section of System Settings, there are two settings for passing CSS styles to whatever RTE you are using. editor_css_path lets you specify a file, and editor_css_selectors tells you to enter a comma-separated list of styles. I can’t seem to get editor_css_selectors to work though - the values do not show up in the styles pulldown of TinyMCE. I’ve tried this on 2.0.4pl2 and 2.06, and with the latest version of Tiny (and the previous version of Tiny), but can’t seem to get them to work. Is anyone using this setting successfully? Is there something I’m doing wrong?
I doubt you’ve done anything wrong - I experienced the same thing, so there’s some funky thing that happens with Revo.
In my case, I generally don’t offer special styling via the editor, so I haven’t pursued it further. Maybe if enough people find this annoying, it will get some traction.
I actually liked the another editor package that was offered sometime ago with an older version of Revo - I think it was CKEditor, and I noticed they pulled it out - something about making one editor standard with Revo, if I recall.
TinyMCE in revo is really frustrating. In this case, the setting is wrong. To find the setting you want, go to System Settings, in the second of the two filter dropdowns (it says "core" by default) select "tinymce". Once the panel loads you’ll see a CSS Selectors setting, key tiny.css_selectors, this works. Or just type "css_selectors" (without the qoutes) into the filter input field.
Quote from: nsfdev at Jan 08, 2011, 11:13 PM
TinyMCE in revo is really frustrating. In this case, the setting is wrong. To find the setting you want, go to System Settings, in the second of the two filter dropdowns (it says "core" by default) select "tinymce". Once the panel loads you’ll see a CSS Selectors setting, key tiny.css_selectors, this works. Or just type "css_selectors" (without the qoutes) into the filter input field.
NSF is right! When you set up your style choices, and then highlight some text in the editor, your selection will be surrounded by SPAN tags with that item as a class. Could be quite useful for minor styling. Of course, you’ll need to define these classes in your CSS, it’s not like an inline style.
If you highlight a full block of text, your class will be assigned to the containing element, or should be. For instance, say you have a list style called features (as I do in a recent project), used specifically to style lists that enumerate the features of a product or service. Highlight all of the list items and select the style from the dropdown and the class is assigned to the UL. Which is the correct behavior. TinyMCE is an excellent WYSIWYG, but the current MODx implementation imposes some unfortunate limitations.
NSF,
You’ve got another point! When I tested it at first, it turns out that my single block of plain text I pasted in got no paragraph tags. And highlighting that put SPAN tags with a class around it. I don’t know about you, but I thought at least Tiny was smart enough to stick paragraph tags around a plain old block of text.
So when I went back in and stuck in a 2nd block of plain text, lo and behold, all of a sudden paragraph tags around both paragraphs, AND as you said, when using the style dropdown at that point, the paragraph (the containing element) got the class. You’re awesome!
I know it’s hard to make a WYSIWYG editor work. My patience with Tiny right now is extremely low - I just killed a bunch of time trying to get Formit to work with checkboxes. It finally did after lots of screwing around, but not before Tiny crushed my Formit conditional code. Shutting off Rich Text fixed that, at least. Formit is cool, but I had (foolishly) hoped that it would be a lot quicker and easier than Eform. Formit was advertised as not needing a chunk for the form, but if Tiny’s going to kill it, maybe I’ll use a chunk anyway. (end of whining)
-
☆ A M B ☆
- 450 Posts
Thanks for the help everybody. I wasn’t getting notifications after the first reply (I think maybe it was due to gmail conversation threading) - but I came upon tiny.css_selectors on my own just now and was going to post an update.
I think one thing that would really help the advancement of Revo was if there were a few more folks dedicated to becoming experts at customizing/troubleshooting TinyMCE. It seems like there is a lot of potential there to make it work much better w/ Revo.
I’d settle for getting it to work in the front end at all.
For me, when you click on a toolbar button in the front end, it’s still looking for modx-panel-resource. :’(
I know this is an old thread, but there is good info here...