Using latest version CMSMS.
I notice that others have run into the problem of the WYSIWYG text editor stripping out some of the added code. Is there a solution - perhaps another text editor that lets me enter my own code and retains it?
Is there someway the settings can be altered in TinyMCE? I have not gone there yet - will wait and see if anyone knows what to do.
Thanks.
TinyMCE stripping my code
Re: TinyMCE stripping my code
Mind sharing what code it is that gets stripped?...
Re: TinyMCE stripping my code
In TinyMCE->Advanced->Extra Configuration, you can place TinyMCE directives to decide which tags are kept. The issue is that this replaces the default list. I'm not sure if it's using Tiny's default, or if CMSMS sets this default. If you put your favorite tag in this list, these will be the only tags accepted, and <p>, <h1>, etc will be deleted. Check the Tiny Wiki for the syntax of this directive.
I think it would be nice for future Tiny module releases to provide a field that indicates all accepted html tags (and attributes of those tags) that are accepted, where admins can add or delete at will.
I think it would be nice for future Tiny module releases to provide a field that indicates all accepted html tags (and attributes of those tags) that are accepted, where admins can add or delete at will.
Re: TinyMCE stripping my code
This is the code I used - it is for a rounded corner box and I have used it on countless websites as is.
<div class="rcbox">
<div class="rctop"><div></div></div>
<div class="rccontent">
<p>Lorem ipsum dolor sit amet, consectetur
adipisicing elit, sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua.</p>
</div>
<div class="rcbottom"><div></div></div>
</div>
I tried putting each <div></div> on a separate line - made no difference. I am left with:
<div class="rcbox">
<div class="rccontent">
<p>Lorem ipsum dolor sit amet, consectetur
adipisicing elit, sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua.</p>
</div
</div>
It takes me back a few years to when I first started designing and used a WYSIWYG editor (not knowing any better at the time) and got so annoyed at the way it didn't want to do things my way that I ditched it and started learning HTML and CSS.
<div class="rcbox">
<div class="rctop"><div></div></div>
<div class="rccontent">
<p>Lorem ipsum dolor sit amet, consectetur
adipisicing elit, sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua.</p>
</div>
<div class="rcbottom"><div></div></div>
</div>
I tried putting each <div></div> on a separate line - made no difference. I am left with:
<div class="rcbox">
<div class="rccontent">
<p>Lorem ipsum dolor sit amet, consectetur
adipisicing elit, sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua.</p>
</div
</div>
It takes me back a few years to when I first started designing and used a WYSIWYG editor (not knowing any better at the time) and got so annoyed at the way it didn't want to do things my way that I ditched it and started learning HTML and CSS.
Re: TinyMCE stripping my code
Yes tiny auto strips empty tags like div, maybe put it in the template and use a {content block='secondblock'} tag in them...
Re: TinyMCE stripping my code
Tiny won't strip out an empty div if it has an HTML comment in it: <div><!-- --></div>
Re: TinyMCE stripping my code
Then it's not empty...
Re: TinyMCE stripping my code
It's effectively empty, and It accomplishes what he needs to do.Dr.CSS wrote:Then it's not empty...
Re: TinyMCE stripping my code
What a great idea! Thanks Wishbone and Dr.CSS - will try that.