Page 1 of 2
TinyMCE and Styles
Posted: Wed Jun 22, 2005 11:15 am
by miketmc
Help needed!
Has anyone a idea, how to use styles within TinyMCE and in which CSS to define? (see screenshot!)
(or does it work with an another editor in wysiwig??)
This would enomously help, to have an corporate design on the web-site.
Problem is also discussed in the german-forum, but there is (for me) no satisfactory solution
(german discussion see here -->
http://forum.cmsmadesimple.org/index.ph ... 007.0.html
the herein discussed solution is (for me) to comlicate or not satisfactory, cause you have to write too CSS-Files or permanetly write new CSS-definitons into the "TinyMce.module.php".
For my opinion this is no good solution for an CMS.
[attachment deleted by admin]
Re: TinyMCE and Styles
Posted: Wed Jun 22, 2005 3:50 pm
by Ted
The styles dropdown should be filled in automatically with the styles for that particular template. It's working correctly on my test box here...
Re: TinyMCE and Styles
Posted: Wed Jun 22, 2005 6:44 pm
by miketmc
wishy wrote:
The styles dropdown should be filled in automatically with the styles for that particular template. It's working correctly on my test box here...
Yes, that is exactly what I would expect!
But it didn´t work (in my installation). My styles dropdown is allways empty.
Any idea what is going wrong?
(using 0.10beta4, loaded from the website, no daily!)
Re: TinyMCE and Styles
Posted: Wed Jun 22, 2005 7:32 pm
by Ted
Ok, a little browser magic.
Assuming your editcontent URL is something like:
Code: Select all
http://somesite.com/admin/editcontent.php?contentid=1
, change the url to:
Code: Select all
http://somesite.com/stylesheet.php?templateid=1
Does the stylesheet display properly? If there is any kind of weird error showing up, it's going to throw off the css parser in tinymce.
Re: TinyMCE and Styles
Posted: Wed Jun 22, 2005 7:43 pm
by miketmc
wishy wrote:
Ok, a little browser magic.
........, change the url to:
Code: Select all
http://somesite.com/stylesheet.php?templateid=1
Does the stylesheet display properly? If there is any kind of weird error showing up, it's going to throw off the css parser in tinymce.
OK, when changing the url I see the a CSS.
It´s funny: firefox shows the CSS (with a lot of redundant items!!)
IE says: page not found
And now?
Re: TinyMCE and Styles
Posted: Wed Jun 22, 2005 9:10 pm
by Ted
Hmm
And if you look for content_css : in the view source of editcontent.php, does it have "../stylesheet.php?templateid=1"?
Re: TinyMCE and Styles
Posted: Thu Jun 23, 2005 7:12 am
by miketmc
wishy wrote:
Hmm
And if you look for content_css : in the view source of editcontent.php, does it have "../stylesheet.php?templateid=1"?

in my editcontent.php there isn´t an entry like "../stylesheet.php?templateid=1"
I have had an look in the daily editcontent.php --> no entry like "../stylesheet.php?templateid=1"
see attached file (editcontent.php --> renamed to editcontent.txt)
I´m confused
[attachment deleted by admin]
Re: TinyMCE and Styles
Posted: Thu Jun 23, 2005 10:12 am
by Ted
I mean, edit a page in CMS. Hit View Source in your browser.
Re: TinyMCE and Styles
Posted: Thu Jun 23, 2005 10:21 am
by miketmc
ooops, a little missunderstanding...., sorry
OK:
the source-view (firefox) shows:
------> /stylesheet.php?templateid=4"
Re: TinyMCE and Styles
Posted: Thu Jun 23, 2005 10:34 am
by Ted
There is a .. in front of that, right?
Re: TinyMCE and Styles
Posted: Thu Jun 23, 2005 10:46 am
by miketmc
no, it isn´t
the complete entry looks like this:
Code: Select all
<link rel="stylesheet" type="text/css" href="http://my_url_is_here/stylesheet.php?templateid=4" />
Re: TinyMCE and Styles
Posted: Thu Jun 23, 2005 3:23 pm
by Ted
When I hit View Source on the edit content page, I have (among other stuff):
Code: Select all
tinyMCE.init({
mode : "exact",
elements : "content_en, block1, block2, block3, block4, block5",
content_css : "../stylesheet.php?templateid=1",
theme : "advanced",
theme_advanced_toolbar_location : "top",
Notice the content_css. That's where TinyMCE is getting it's CSS definition from.
Re: TinyMCE and Styles
Posted: Thu Jun 23, 2005 8:22 pm
by miketmc
Sorry, that´s not what I see:
Code: Select all
tinyMCE.init({
mode : "exact",
elements : "content_en",
theme : "advanced",
theme_advanced_toolbar_location : "top",
verify_html : "false",
verify_css_classes : "false",
plugins : "table,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,ibrowser",
theme_advanced_buttons1_add : "fontselect,fontsizeselect,forecolor",
theme_advanced_buttons2_add_before: "cut,copy,paste,separator",
theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom",
theme_advanced_buttons3_add : "tablecontrols,emotions,iespell,flash,advhr,ibrowser",
document_base_url : "http://directsales.di.funpic.de/",
relative_urls : "true",
plugin_insertdate_dateFormat : "%Y-%m-%d",
plugin_insertdate_timeFormat : "%H:%M:%S",
valid_elements : "*[*]",
extended_valid_elements : "*[*]",
auto_reset_designmode : "true",
trim_span_elements : "false"
});
What must I do?
Seem´s that yout tinyMCE is different.
Thank´s for your help and your patience.
Re: TinyMCE and Styles
Posted: Thu Jun 23, 2005 9:30 pm
by Ted
Ah hah! Ok, I'll dig through the code and see what's going on.
Re: TinyMCE and Styles
Posted: Thu Jun 23, 2005 11:15 pm
by Ted
Well, it took me an hour and a half to track it down, but I found the bug. It's fixed in svn. Thanks!