question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

forced_root_block deprecation

See original GitHub issue

Apologies if this is not the right place to ask this.

I found this in the docs: Important: Setting forced_root_block to false or an empty string has been deprecated in TinyMCE 5.10. For TinyMCE 6.0, this option will only accept valid block elements.

I want to prevent <p> tags from being generated on enter, and instead create <br>s. This used to be possible by setting forced_root_block to false.

Will there be any way to do this in TinyMCE 6?

See: https://github.com/tinymce/tinymce/issues/6304 https://github.com/tinymce/tinymce/issues/2634

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:11

github_iconTop GitHub Comments

1reaction
dav-sapcommented, Oct 21, 2021

Im trying to understand, what about using forced_root_block: 'div' doesn’t that remove the extra space p gives you, and also uses new lines and everything. Are there any issues with outlook here?

1reaction
Daijoboucommented, Oct 15, 2021

I’d like to explore and discuss your use case for using BR tags instead of paragraphs.

I honestly don’t understand this question. TinyMCE replaces textarea and textarea does not use paragraphs. Text is written much more often without paragraphs. Pragraphs are needed in scientific texts or in news and blogs.

In comment system or forum posts or or or … paragraphs are not needed. Most users make a line break after each sentence. This is not what paragraphs are for. If we need paragraphs, we press Shift+Enter. There are also situations where you edit a part of a paragraph and it should not contain any other paragraphs because it is already contained in a paragraph. This would destroy the formatting.

Read more comments on GitHub >

github_iconTop Results From Across the Web

forced_root_block deprecation · Discussion #7342 · tinymce ...
I found this in the docs: Important: Setting forced_root_block to false or an empty string has been deprecated in TinyMCE 5.10. For TinyMCE...
Read more >
forced_root_block - TinyMCE
This option enables you to make sure that any non block elements or text nodes are wrapped in block elements. For example something...
Read more >
TinyMCE 6.0 forced root block option - Stack Overflow
I understand option forced_root_block will be removed from TinyMCE version 6.0. ... How can I turn off TinyMCE deprecated messages ...
Read more >
deprecation : r/fabricmc - Reddit
when building my mod deprecation warnings pop up because i override deprecated methods. however, there is no documentation what to use ...
Read more >
tinymce | Yarn - Package Manager
#TINY-8399; Removed support for the deprecated false value for the forced_root_block option. #TINY-8260; Removed the jQuery integration.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found