TinyMCE 5: how to nobreaking_wrap:false?

In TinyMCE 5 (by jako) I can add the nonbreaking plugin for an insert and a button for a nonbreaking space  

When I put a nonbreaking space into the text I get an unwanted span around it.

How can I set the nonbreaking_wrap: false setting described here: Nonbreaking Space plugin | TinyMCE Documentation?

Additional question:
How to add an individual class for instance the class “marker” which sets a
<span class="marker">my text</span>

Does it work if you set the system setting tinymcerte.settings to {"nonbreaking_wrap": false}?

1 Like

Ah … I had tried [{"nonbreaking_wrap": false}] in the system setting line, without the square brackets it works!

And how to set additional classes??

What exactly do you mean by “additional classes”?

Have found it by try and error …

What I needed: mark part of the text (i.e. “dolor sit”), then set an individual style on this part. The result in HTML should be:
Lorem ipsum <span class="marker">dolor sit</span> amet, consectetur adipisici elit

The solution: in the system setting line “tinymcerte.inline_format” I added this:
{"title": "Marker", "inline": "span", "classes": "marker"}

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.