Reply New Topic
2012/4/12 14:22:14
Home away from home

TinyMCE: redundant lines of code

Are the following lines in tinymce/tinymce.php redundant or not?
$this->setting["content_css"] = @$this->config["content_css"] ? $this->config["content_css"] : "editor_xoops.css";
if (!is_readable(ICMS_ROOT_PATH . $this->rootpath. '/themes/'.$this->setting["theme"].'/css/' .$this->setting["content_css"])) {
unset( $this->setting["content_css"] );

McDonalds Store

2012/4/15 11:58:43
Home away from home

Re: TinyMCE: redundant lines of code

Looks like the code is redundant because it points to a folder called 'themes/../css' which I can't find.
It's for configuring a css to be used for the TinyMCE textarea so you really see how the content will look in the frontend.

Maybe it's an idea to have a css within a theme which can be used for this.
TinyConfig can be used to enable the css yes/no.

content_css : "themes/theme/tinymce_content.css"

McDonalds Store

2012/4/17 7:21:47

Re: TinyMCE: redundant lines of code

That would remedy in part one of the big issues I have with editor implementation at the moment : WYSIRWYG (what you see is really what you get.

I'm all for better integrated editors.


Me on Ohloh

2012/4/17 8:23:26
Home away from home

Re: TinyMCE: redundant lines of code

The trunk version of TinyConfig has an option for entering the path to a custom CSS.

If the option is left blank the default CSS of the selected TinyMCE theme will be used.

It's advised to use the deault CSS (editors/tinymce/jscripts/themes/advanced/skins/default/content.css) as a base for a custom version.

See also the TinyMCE documentation:

I have been experimenting with using custom CSS files placed in the theme folders. This didn't work well when having the block for selecting themes activated.

McDonalds Store

Reply New Topic extras
 Previous Topic   Next Topic
You can view topic.
You can start a new topic.
You can reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You can post without approval.