Tuesday, July 6, 2010

Re: TinyMCE css with CakePHP

Hi,

Maybe it is taking the css from the cache. You can try to put:
content_css : "<? echo $this->webroot.'/css/content.css';?>?" + new
Date().getTime(),
in the css line.

On 6 jul, 08:11, Sanfly <san...@gmail.com> wrote:
> Hi
>
> Im trying to set up TinyMCE with my cake installation, but im having
> trouble with the css styles.
>
> I want to have the text inside my textarea/tinyMCE window have the
> same styles as the text on my website.
>
> According to the TinyMCE docs(http://wiki.moxiecode.com/index.php/
> TinyMCE:Configuration/content_css), I need to copy the default/
> content.css file somewhere else, make my changes, then add the
> following line of code to my TMCE initialisation
>
> content_css : "css/custom_content.css",
>
> So, i made copied and renamed the css file, made my changes and put
> into my cake css dir - webroot/css/tiny_mce.css
>
> I then added the following line to my view
>
> content_css : "<?=$this->webroot?>css/tiny_mce.css",
>
> However, Im not seeing the changes I implemented (namely increasing
> the size of the font)
>
> Is this something to do with having the incorrect relative path for
> the css file?
>
> It seems correct, when the file is parsed and I view the source code
> for the page I get:
>
> content_css : "/DSC/css/tiny_mce.css",
>
> which compared to say my main css file link seems to have the correct
> path
>
> <link rel="stylesheet" type="text/css" href="/DSC/css/dsc.css" />
>
> Any ideas on what the problem is?

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: