Search

Hi,

I'm trying to configure TinyMCE for my own css classes. The documentation says it is as simple as editing the applyMCE.js file with this:

tinyMCE.init({ themeadvancedstyles : "Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1" });

But I'm having no joy... Anyone know where I'm going wrong?

Thanks AL

I'm also having trouble getting the content_css thing to work

Yeah Eoghan, I tried that too.

I just can't find a way to get any of my styles working.

Anyone know what to do?

You need to create an external CSS file and link to it in your tinyMCE.init. (You'll find it in applyMCE.js in the extension's assets folder.) Like this:

 content_css                    : "/workspace/css/tinyMCE.css",

Also, when you do this, some styles, like link color will be overridden by TinyMCE. To override them, you can use the CSS !important attribute.

If you want to include block elements, like H1, H2, P you have to do it this way:

 theme_advanced_blockformats    : "p,h3,h4,h5,h6,div",

This one requires the Advanced theme. You can find more info here: http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/themeadvancedblockformats

Table editing is buggy, but you can try it with Firefox. http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/tableinlineediting

Here are the rules I use with my TinyMCE install to match the published site design:

tinyMCE.css

 .left {float:left;margin:.5em 1.5em 1.5em 0;padding:0;}
 .right {float:right;margin:.5em 0 1.5em 1.5em;}
 .highlight {background:#ff0;}
 .clear {clear:both;}
 p, li, blockquote {font-size:1.2em; line-height:1.4;}
 h3 {color:#F30; font-size:2em; line-height:1.2; margin-bottom:.3em; font-weight:normal;}
 h4 {color:#693; font-size:1.4em; line-height:1.25; margin-bottom:.3em; font-weight:bold;}

Important

To see changes made in the tinyMCE.init you have to clear your cache and reload the page.

MarkitUp editor would be a cool extension for those of us who hate WYSIWYG.

I'm having a problem with TinyMCE forcing linebreaks in the output, as if there is a maximum amount of characters allowed on each line.

Is this a setting which can be changed perhaps?

Never mind, it seems someone modified the text meanwhile adding the breaks ;)

I’m trying to figure out how to remove SPANs and DIVs when I paste from any rich text document into a field with TinyMCE as the editor.

I’ve found one tutorial but I can’t figure out where the actual files it’s referring to are…

http://www.littleforest.co.uk/teamsite/remove_formatting_tinymce/

Hi, I’m having issues with displaying the edited content. All html is stripped.

Here’s how i’m trying to output the content: < xsl:value-of select=”description” disable-output-escaping=”yes” mode=”html” />

Any idea?

Ok, I will answer the question myself ;)

First of all you need to import typography: <xsl:import href="typography.xsl"/>

And than just output the content like this: <xsl:apply-templates select="description/*" mode="html" />

what typography.xsl file are you referring to?

It’s by default in symphony. It’s located in workspace/utilities/typography.xsl as far as I remember.

Using value-of will strip any tags inside the selected node, since value of does just that (gets the value, not the structure). Since the output of TinyMCE HTML, this is XML from your Data Source, therefore you can use an XSL copy-of to output both the node structure and its value.

<xsl:copy-of select="description/*"/>

@kuba - You’re right. I never noticed that. I’ve been using Allen’s Ninja Technique for a while now. It’s really helpful.

BZ

After upgrade to symphony 2.0.4 I get an error:

Call to a member function addScriptToHead() on a non-object in /symphony/extensions/richtext_tinymce/extension.driver.php on line 33

How to fix it?

[HELP NEEDED] POSSIBLE BUG with TinyMCE extension version 1.01.

I’m getting the following error when I do a fresh install of symphony and enable TinyMCE. I’m running this on PHP 5.3.

Fatal error: Class ‘Administration’ not found in /Users/testuser/Sites/symphonysite/public_html/extensions/richtext_tinymce/extension.driver.php on line 33

I’ve posted this bug on github as well, http://github.com/pointybeard/richtext_tinymce/issues#issue/1.

Can anyone advise me on how to get this fixed?

@bzerangue - I’m assuming you’re installing local (OSX-SL) rather than on the Ubuntu box? I’ve installed TinyMCE twice on Vista/XP locals and just put one out on the Ubuntu box.

Aside from the OS, and PHP 5.3 the only other difference I can think of would be that I haven’t been using the customized init javascript you typically use (given I don’t believe our internal Milestone 1 requires it), but have been using the default that comes with the plugin.

Could it be the init javascript?

@wjnielsen - I’m not using the custom init javascript yet. I’m using the one that came with the extension. Thanks for the suggestion.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details