Replies: 30 comments 46 replies
-
I'd like to know that, too. Otherwise, I guess we can't use version 6. |
Beta Was this translation helpful? Give feedback.
-
Hi everyone, This is a good place to bring up your concerns around deprecated items that you rely on. TinyMCE is moving into the collaboration space, and we need to review and streamline what we support. The current forced_root_block: false setting is difficult to have working with block based content (eg: lists and tables). It can also block various editor functions from working correctly and cause non-semantic HTML to be generated. We can simplify our code by removing this support and prefer to find alternative approaches that is easier to maintain without the negative side effects this setting can create. I'd like to explore and discuss your use case for using BR tags instead of paragraphs. Hopefully we can find a solution that allows you to continue serving the current use case and or improve it. Please share your use case and why you can't wrap text in blocks and if you know of any alternative approaches to achieve your requirement that we can better support for you in the next major revision. I'm seeking understanding of the problem to be solved and ideas or alternatives that could work. TinyMCE Product Team |
Beta Was this translation helpful? Give feedback.
-
We used forced_root_block to have |
Beta Was this translation helpful? Give feedback.
-
Hi Georgevanvelzen, I see your use case is around emails, and that outlook strips out html and just leaves plain text. I am familiar with this issue dealing with old email clients a long time ago, but not so much recently so i'll need to get more context on whats happening. Just some follow up questions to help me understand.
I'd like to fully understand the context and the conditions this occurs before we start looking for solutions |
Beta Was this translation helpful? Give feedback.
-
I honestly don't understand this question. TinyMCE replaces textarea and textarea does not use paragraphs. 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. |
Beta Was this translation helpful? Give feedback.
-
We use the TinyMCE editor to allow users to edit the description of a calendar invite. See this example screenshot, which would be generated by this text:
|
Beta Was this translation helpful? Give feedback.
-
Hi, based on the feedback so far, TinyMCE has a getContent api that returns only text and \n newlines. This takes a post processing approach to the situation, where you create rich HTML in the editor and upon exporting the content, you cleanup the content to suit the publishing needs, aka email calendar or outlook. Have a try of |
Beta Was this translation helpful? Give feedback.
-
Paragraph formatting was confusing for our users writing emails in TinyMCE, they want line breaks to work like the Gmail editor. And I've found that |
Beta Was this translation helpful? Give feedback.
-
Im trying to understand, what about using |
Beta Was this translation helpful? Give feedback.
-
Thanks @EkimChau. This doesn't work for us though, because we still want html tags such as links. Our use cases:
|
Beta Was this translation helpful? Give feedback.
-
This thread "forced_root_block deprecation" has been moved to Github discussions, you can continue to follow this thread here https://github.com/tinymce/tinymce/discussions/categories/general This discussion seeks to find a suitable path forward for developers requiring the deprecated |
Beta Was this translation helpful? Give feedback.
-
Our editors use TinyMCE to input rich HTML content which might later be displayed inside a It will be problematic if TinyMCE starts wrapping that content in |
Beta Was this translation helpful? Give feedback.
-
While not a complete solution to what is discussed here, setting CSS on P tags to make them only take up 1 line is preferred to using this config option. p {margin: 0; padding: 0} |
Beta Was this translation helpful? Give feedback.
-
Would it help if we created something like Additional integration config would still be required to prevent other ways users can create block tags, such as removing block format features and filtering pasted content, but a lot of the problems described here seem like they are focussed around preventing the creation of P tags through normal typing. We should be able to solve that specific need fairly easily. |
Beta Was this translation helpful? Give feedback.
-
From what I can see in this thread the use for There are two solutions for this:
The problems with supporting
All other tools you use from day to day like office and Google docs uses paragraphs as their line separator and br like softbreaks on shift+enter why you usually don't see this space between the "lines" is that they have very small default paragraph margins this can be changed in layout settings in Word for example then it works exactly like tinymce does today in it's default mode. Having a BR on enter mode will complicate things like alignment. If you enter two lines of text then those would get wrapped in a P or DIV element and when you align one of those lines either both lines gets aligned if the css alignment is set on the parent block, the block needs to be split in the P case since a extra DIV is not valid within a P tag or the line needs to be converted into a DIV within a DIV. As you see just this simple feature becomes quite complicated in a BR enter mode to deal with if you want it to work as you expect it to work. |
Beta Was this translation helpful? Give feedback.
-
spocke argues: So what? But that does not mean, that we need a BR only mode inside Tiny. So my suggestion is a combination of two features: 1.) a new config option like 'keyboard_enter_behaviour' Different options for the behaviour when pressing enter: But when pasting there is no automatic conversion of P tags into BR tags - P tags remain and will be inserted. 2.) a new additional filter for getContent This function will export html text after
|
Beta Was this translation helpful? Give feedback.
-
This change has been made in 6.0 (#7519). We accept that this means some people will be stuck on 5.x until we offer an alternative solution, such as the |
Beta Was this translation helpful? Give feedback.
-
Any news about it? Several members from our team spent 3 days trying to update this editor. But there's always a problem with change tracker as it's not clear how to update existing texts as there are issues in tinymce itself related to that setting: #7821 So, currently we decided to stick to v5 and in future switch to some other WYSIWYG editor if |
Beta Was this translation helpful? Give feedback.
-
We managed to squeeze this into the 6.1 release plan 🙂 For the moment we're just going to add an option to change the behaviour when pressing enter as summarised above by @Georg-Git. I suspect we can come up with a node filter configuration example to achieve the proposed I'll post a request for feedback here when the PR for the option is merged. |
Beta Was this translation helpful? Give feedback.
-
My use case is editing headline html and other single-line fields that are later wrapped in the appropriate block element. I need |
Beta Was this translation helpful? Give feedback.
-
The new option This doesn't replace |
Beta Was this translation helpful? Give feedback.
-
newline_behavior: "invert" - what is the meaning/expected behavior of this option? In reference to the fiddle of @TheSpyder : |
Beta Was this translation helpful? Give feedback.
-
@TheSpyder I think we may have found a way to make this work, using In regards to our newline behavior - is there a way to control what shift+enter does (other than by doing something like this)? We want to make shift+enter behave the same way as enter - insert a block ( Thank you |
Beta Was this translation helpful? Give feedback.
-
So what is the solution? Is this another library that needs 14 more libraries to hardcode and maintain? haha. What a joke. Consider other alternatives. |
Beta Was this translation helpful? Give feedback.
-
@TimMTech @liesahead We solved this with two different configuration options for our app
See full code below.
|
Beta Was this translation helpful? Give feedback.
-
I've a translation system and not need to add the "p" tag, |
Beta Was this translation helpful? Give feedback.
-
I use tinyMCE to edit content directly from website Frontend. Some of that editable zones are just single image, nothing else. I want to let the end user to edit image using tinyMCE (add alt tag, pick a new image with the file manager etc....) The problem is the p tag added around my image when I initialize tinyMCE for that editable block. Even if I can avoid to save that p tag when I call getContent() method, the fact that p tag is added when I activate the editor break my layout. Best regards, |
Beta Was this translation helpful? Give feedback.
-
In tinymce 6, if I set the forced_root_block property to a non-tag value, then no tag was added by the editor (I expected the default value - paragraph)
|
Beta Was this translation helpful? Give feedback.
-
No update here, right? |
Beta Was this translation helpful? Give feedback.
-
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 settingforced_root_block
to false.Will there be any way to do this in TinyMCE 6?
See:
#6304
#2634
Beta Was this translation helpful? Give feedback.
All reactions