23546 Posts in 19335 Topics by 2889 members
|Go to End|
2 September 2010 at 3:58am Last edited: 2 September 2010 4:08am
Just a quicky. I have a custom HTMLEditorField that I am loading into a form on a page. It is working pretty well and I have removed all but simple "bold","bullets" (etc) buttons.
I was wondering though, can I add custom CSS to this field? Maybe using HTMLEditorConfig? The default font is a little hard to read.
Currently the field is not loading editor.css, so I cant use that approach
2 September 2010 at 4:02am
Something like this?:
$cfgContent = HtmlEditorConfig::get('someIdentifier');
2 September 2010 at 4:08am
Now if I could only stop the bloody thing caching...
Thanks for your help.
2 September 2010 at 4:18am
Does this work?
$cfgContent->setOption('content_css', 'admintheme/css/editor.css?' .time());
2 September 2010 at 5:06am
Ooo, Thats a good idea, why have I never thought of that?? ;)
25 February 2011 at 10:45am
Any idea why this does not work? I get an error:
[User Error] Uncaught Exception: Object->__call(): the method 'setoption' does not exist on 'HtmlEditorField'
$Content = new HTMLEditorField("Content", "Post", 20,75);
$fields = new FieldSet(
new TextField("Title", "Title"),
new CheckboxField("Agree", 'Agree?')
25 February 2011 at 12:18pm Last edited: 25 February 2011 12:18pm
Hi, setOption($k, $v) is a method of the HtmlEditorConfig class.
But you try to call it on an HtmlEditorField object (which totally doesn't know anything about it and is confused now ;-))
|Go to Top|