Page 2 of 2
Re: TinyMCE and Styles
Posted: Fri Jun 24, 2005 6:41 am
by miketmc
Just loaded the daily!
No effect!!

Re: TinyMCE and Styles
Posted: Fri Jun 24, 2005 10:00 am
by Ted
The dailly won't refresh until around 12.30 your time.
Re: TinyMCE and Styles
Posted: Fri Jun 24, 2005 11:38 am
by miketmc
thanks, now I see the code:
Code: Select all
tinyMCE.init({
mode : "exact",
elements : "content_en",
content_css : "../stylesheet.php?templateid=4",
theme : "advanced",
theme_advanced_toolbar_location : "top",
verify_html : "false",
verify_css_classes : "false",
I´m allways confused: were is the CSS-File stored??
I put a new entry in my CSS, belonging to my template --> don´t appear in the drop-down
put a new entry in the stylesheet.css (same path as stylesheet.php) --> don´t appear in the drop-down
Thank´s for your patience!
Re: TinyMCE and Styles
Posted: Fri Jun 24, 2005 11:50 am
by Ted
It's stored in the database. So, any CSS classes attached to your template (either the stylesheet box on edit template, or using the stylesheet management stuff) should show up in that dropdown box.
Re: TinyMCE and Styles
Posted: Fri Jun 24, 2005 12:11 pm
by miketmc
OK:
You have to declare your CSS-entrys like shown in picture 1
and you have it (s. picture2)
but it has no effect to your web-site (s. picture3)
the html-code in tinyMCE shows this:
body
body 2
body 3
test
[attachment deleted by admin]
Re: TinyMCE and Styles
Posted: Fri Jun 24, 2005 12:20 pm
by Ted
Body2 isn't a valid xhtml tag, and if it's meant to be a class, then it should have a . in front of it.
Re: TinyMCE and Styles
Posted: Fri Jun 24, 2005 12:31 pm
by miketmc
!!!! WOW !!!!!
OK, I´m stupid
do it like this:
.body2 { color: #000AA0;
background-color: #ffff;
font-size: 12pt;
font-family: Tahoma;
margin: 10; }
.body3 { color: #000BB0;
background-color: #ffff;
font-size: 18pt;
font-family: Tahoma;
margin: 10; }
AND IT WORKS FINE!! WITH WYSIWIG!!
Thanks a lot for your help and your patience!
Re: TinyMCE and Styles
Posted: Fri Jun 24, 2005 12:39 pm
by Ted
Great! I'm glad it's working.
Re: TinyMCE and Styles
Posted: Mon Oct 10, 2005 12:29 am
by iNSiPiD
Hi Wishy,
I use @import to bring in my stylesheets so I get no styles in the editor.
Can I just hard code line 151 in TinyMCE.module.php to get my CSS, or is there a better way?
// Edited to show custom styles
// echo 'content_css : "' . $css . "\",\n";
echo 'content_css : "../../../styles.css"',\n";
[edit]
Or like this even :*
echo 'content_css : "../../../styles.css"',"\n";
I've made the change and the javascript below appears in page source on an instance of the editor. It looks good to me. Unfortunately the editor toolbar doesn't appear now and I get the content HTML source in the textarea. Did I replace the wrong CSS or is my path just wrong?
Any ideas?
Code: Select all
tinyMCE.init({
mode : "exact",
elements : "content_en",
content_css : "../../styles.css"
theme : "advanced",
theme_advanced_toolbar_location : "top",
verify_html : "false",
verify_css_classes : "false",
plugins : "table,advhr,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,zoom",
theme_advanced_buttons3_add : "tablecontrols,emotions,iespell,flash,advlink,advhr,ibrowser",
document_base_url : "http://d81314.i50.quadrahosting.com.au/",
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"
});
Re: TinyMCE and Styles
Posted: Mon Oct 10, 2005 1:11 am
by iNSiPiD
Soz. Was missing a comma at the end of the CSS declaration.
Source now reads:
content_css : "../../style.css&stripbackground=true",
The toolbar is back but the styles dropdown is still empty. Does it need to be a PHP file or something?
I've cleared the cache and still no joy.