TinyMCE and Styles

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
miketmc

TinyMCE and Styles

Post 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]
Last edited by miketmc on Wed Jun 22, 2005 12:35 pm, edited 1 time in total.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: TinyMCE and Styles

Post 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...
miketmc

Re: TinyMCE and Styles

Post 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!)
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: TinyMCE and Styles

Post 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.
miketmc

Re: TinyMCE and Styles

Post 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?
Last edited by miketmc on Wed Jun 22, 2005 7:56 pm, edited 1 time in total.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: TinyMCE and Styles

Post by Ted »

Hmm

And if you look for content_css : in the view source of editcontent.php, does it have "../stylesheet.php?templateid=1"?
miketmc

Re: TinyMCE and Styles

Post 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]
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: TinyMCE and Styles

Post by Ted »

I mean, edit a page in CMS.  Hit View Source in your browser.
miketmc

Re: TinyMCE and Styles

Post by miketmc »

ooops, a little missunderstanding...., sorry

OK:

the source-view (firefox) shows:
  ------> /stylesheet.php?templateid=4"
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: TinyMCE and Styles

Post by Ted »

There is a .. in front of that, right?
miketmc

Re: TinyMCE and Styles

Post 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" />
Last edited by miketmc on Thu Jun 23, 2005 10:48 am, edited 1 time in total.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: TinyMCE and Styles

Post 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.
miketmc

Re: TinyMCE and Styles

Post 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.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: TinyMCE and Styles

Post by Ted »

Ah hah! Ok, I'll dig through the code and see what's going on.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: TinyMCE and Styles

Post 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!
Locked

Return to “CMSMS Core”