Needs review
Project:
Wysiwyg
Version:
6.x-2.x-dev
Component:
Editor - FCKeditor
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
31 Dec 2009 at 13:26 UTC
Updated:
2 Oct 2010 at 15:02 UTC
Jump to comment: Most recent file
Comments
Comment #1
miro_dietikerTried adding it using the CustomStyles dropdown.
In fckeditor an Element like span is needed to assign attributes and styles. How should this work in general?
I'm pretty sure the usage of t() needs work (omitted in tinymce.inc too). But we'd need something to translate the class titles into the right language.
What do you think of it?
Comment #2
twodWe should omit t() here. t() stores all the untranslated strings it finds in the database, so everything entered into the textarea will be permanently saved if it gets this far. There will also be no way to remove any translations if a class is removed from the textarea, nor will it be easy to figure out in which context these titles are used when encountered during translation. I don't know of a good solution to this problem unless the editor provides an easy way to translate the classnames prior to printing them out, which I don't think it does.
I'm on crack. Are you, too?
Comment #3
sunComment #4
alan d. commented@miro Just a word of warning about t(), is is not meant to take user data directly anyway. I guess these classes are escaped before being presented to the user, I hate security updates!
Tested on the following:
version = "6.x-2.x-dev"
datestamp = "1265329172"
The styles applied fine into a span element.
One very cool feature would be to support the target element attribute rather than always applying to a span. See the sites/all/libraries/fckeditor/fckstyles.xml
Comment #5
alan d. commentedAnd the very first time that I required the defined classes was on a p tag, so here is an updated one that allows for three arguments on the list. The third, if present and not empty, is used for the target element.
Do these tags require a check_plain?
Comment #6
hawleyal commentedThis patch does add the custom CSS classes.
However, it only removes the first FCKeditor class (Red Title).
It leaves the rest of the FCKeditor classes intact.
I need to be able to control what classes my users can see and click.
Thanks.
-AH
Comment #7
nrackleff commentedSubscribing
Comment #8
japanitrat commentedsubscribe