M
M
Misha2019-08-05 11:34:37
JavaScript
Misha, 2019-08-05 11:34:37

How to disable inline tags in Ckeditor 4?

You need to disable nested formatting tags in the editor Ckeditor 4.
Those. text can be either bold or italic , but not both !
The editor will only have the most basic formatting options - bold, italic, underline, and add a link. The link also cannot be wrapped in some kind of tag or somehow format the text of the link.
Is there some built-in mechanism for this? (Wrapping with a tag has already been disabled) Or you will have to catch each button click and parse a piece of the line - removing the outer wrapping tag or the inner one (the link tag is more priority).<p>
Another option - maybe there is an opportunity to block buttons immediately if it is clicked on some text already in the tag.
I sort of figured out the catching of button presses - but I'll have to catch each button separately.
But did not find how to block.
I would be glad to hear any hints for a more universal option, maybe there is such a plugin.
PS if suddenly it can be made easier through formatting Markdown, then this option is also allowed (but this editor has not yet been studied). And Ckeditorit is already used on the site to format text in other places.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question