TinyMCE Not Rendering Content per CMSMS Stylesheets

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: TinyMCE Not Rendering Content per CMSMS Stylesheets

Post by Dr.CSS »

TinyMCE as a module has many many layers of folders and files, have you checked to make sure they all have the same permissions in the one that works and the one that doesn't..?
jlkane

Re: TinyMCE Not Rendering Content per CMSMS Stylesheets

Post by jlkane »

Dr.CSS wrote:TinyMCE as a module has many many layers of folders and files, have you checked to make sure they all have the same permissions in the one that works and the one that doesn't..?
In both installations, all TinyMCE directories are 755, all files 644.
jlkane

Re: TinyMCE Not Rendering Content per CMSMS Stylesheets

Post by jlkane »

So... you won't believe this, but...
I accidentally discovered a way to significantly improve the behavior of TinyMCE tonight! What I discovered doesn't fix the problem, but (in my situation, at least) will make TinyMCE usable.

Here's all it took:
I set the default template to be the template we'll use for the vast majority of the pages on the site.

What's going on here?
It turns out that, while TinyMCE fails to load the stylesheet(s) that are linked to the template in use by the page being edited, it loads the stylesheet(s) associated with the DEFAULT template. In my almost-brand-new installations of CMSMS, the default template was set to NCleanBlue, so TinyMCE was styling all my content using NCleanBlue's (irrelevant) styles. The result was, of course, horrible. But when I set the default template to be the template that we'll use for the vast majority of the pages on the site, that large collection of pages now looks fine in TinyMCE. At last!

It's not a perfect solution.
Well, it's not a solution at all, it's just a work-around. But even at that it's not perfect -- content on all pages that use templates other than the default template will be styled incorrectly in TinyMCE. It sure would be nice to figure out how to FIX the problem, but in the meantime we can probably live with it.

And now I can get on with my life and work. BIG thanks to JohnnyB and PaulBaker, who invested significant time in understanding my problem and suggesting solutions. I am deeply grateful to you.
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Contact:

Re: TinyMCE Not Rendering Content per CMSMS Stylesheets

Post by paulbaker »

You're welcome, although Johnny did a lot more than me. Glad you got to a sort-of solution, although it would be great to get to the bottom of why you are having this problem.
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: TinyMCE Not Rendering Content per CMSMS Stylesheets

Post by JohnnyB »

That is an interesting discovery. When I get some time, I'm curious to look at the module's code to see how it is grabbing stylesheets and how it decides which stylesheets to grab. There is probably a better way for it to do that (e.g., the microtiny way) so it grabs the correct ones.
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
jlkane

Re: TinyMCE Not Rendering Content per CMSMS Stylesheets

Post by jlkane »

JohnnyB wrote:That is an interesting discovery. When I get some time, I'm curious to look at the module's code to see how it is grabbing stylesheets and how it decides which stylesheets to grab. There is probably a better way for it to do that (e.g., the microtiny way) so it grabs the correct ones.
I'd love to see you or the module's author compare the stylesheet-loading code used in Tiny and MicroTiny, to try to get to the bottom of this. My instinct suggests that PHP's missing fileinfo() module (or something like that) has to be at fault.

In the meantime, I'll trundle on.

Thanks again,
Jim
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: TinyMCE Not Rendering Content per CMSMS Stylesheets

Post by Dr.CSS »

All these posts and nobody ever mentioned the fact that tiny takes the styles from the template set as default which it has always done, glad you figured it out, now you just need to add all the styles of your site to that template... ;)
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: TinyMCE Not Rendering Content per CMSMS Stylesheets

Post by JohnnyB »

Dr.CSS wrote:All these posts and nobody ever mentioned the fact that tiny takes the styles from the template set as default which it has always done, glad you figured it out, now you just need to add all the styles of your site to that template... ;)
That is good information for sure! I wonder if it can be added to the module help screen?

I guess this thread is an example of another way to tell the old joke, "how many __________(fill in blank) does it take to _________________(fill in blank)" ::)
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
jlkane

Re: TinyMCE Not Rendering Content per CMSMS Stylesheets

Post by jlkane »

Dr.CSS wrote:All these posts and nobody ever mentioned the fact that tiny takes the styles from the template set as default which it has always done, glad you figured it out, now you just need to add all the styles of your site to that template... ;)
Wow, that is SO not the right answer!

Site designers create different page templates to address the need for varying page layouts and styles in different situations throughout a site, and each template has a unique collection of stylesheets associated. That this collection of styles should be represented in the WYSIWYG editor's environment is obvious, and that's exactly what MicroTiny delivers.

Adding ALL of the site's styles to the default template? That's neither right nor practical. Doing so would make a mess of the default template AND of the TinyMCE environment.
Locked

Return to “Modules/Add-Ons”