Chad Caldwell
Chad Caldwell

Reputation: 274

tinymce core functionality manipulation

tinymce automatically inherits the preceding line's formatting when entering new line.

Example: Type the following into the Raw HTML editor of TinyMCE.

<p><span class="test">first</span></a>

Now flip back to the WYSIWYG editor, you will see the word "first". Now in the editor if you click at the end of the word "first" and hit enter, then type "second", then look at the HTML generated you will see

<p><span class="test">first</span></a>
<p><span class="test">second</span></a>

I want it so you would see:

<p><span class="test">first</span></a>
<p>first</a> 

Does anyone have any idea to achieve this? I have been going at this for 6 hours and I'm at the point of jumping out the window.

Upvotes: 0

Views: 83

Answers (2)

Chad Caldwell
Chad Caldwell

Reputation: 274

I figured it out. Set "keep_styles" to false on init.

Upvotes: 1

grmdgs
grmdgs

Reputation: 585

I'm using the TinyMCE editor in WordPress and do not experience this issue. Where are you using the editor?

In WordPress looking at the TinyMCE Advanced settings I only have

Stop removing the <p> and <br /> tags when saving and show them in the HTML editor checked. How is your TinyMCE configured?

Upvotes: 1

Related Questions