wbmnfktr Posted July 20, 2023 Share Posted July 20, 2023 (edited) As the title pretty much says... my TinyMCE always adds an almost empty paragraph (containing only a nbsp) after saving the page. I have to manually remove it via Source Code view to have it fixed for that moment. The next time I edit the content the paragraph gets added again. In total I have to save a page twice. I tried to find a setting or plugin that does that and even disabled lazy loading. No chance. The only setting that fixes this issue is using the inline editor and not the normal editor. But that's not really an option. Has anyone encountered this issue as well or maybe even knows a nicer fix for it? ProcessWire: 3.0.221 PHP: 8.2 Profile: PW Multi-Language Field export below: Spoiler { "prose": { "id": 108, "name": "prose", "label": "Prose", "flags": 0, "type": "FieldtypeTextarea", "inputfieldClass": "InputfieldTinyMCE", "contentType": 1, "inlineMode": 0, "height": 500, "lazyMode": 1, "features": [ "toolbar", "menubar", "stickybars", "purifier", "imgUpload", "imgResize", "pasteFilter" ], "toolbar": "styles bold italic pwlink pwimage blockquote hr bullist numlist table anchor code", "plugins": [ "anchor", "code", "link", "lists", "pwimage", "pwlink", "table" ], "collapsed": 0, "minlength": 0, "maxlength": 0, "showCount": 0, "rows": 15, "textformatters": "", "htmlOptions": "", "extPlugins": "", "toggles": "", "settingsJSON": "", "settingsFile": "", "showIf": "", "themeInputSize": "", "themeOffset": "", "themeBorder": "", "themeColor": "", "themeBlank": "", "columnWidth": 100, "required": "", "requiredAttr": "", "requiredIf": "", "stripTags": "", "placeholder": "" } } [BEST SOLUTION FOR ME SO FAR] Edited August 4, 2023 by wbmnfktr Added link to comment that helped me with this question. Link to comment Share on other sites More sharing options...
ngrmm Posted July 20, 2023 Share Posted July 20, 2023 Not a real fix, but you could activate these two options: Remove empty paragraph texts Remove non-breaking spaces You find them inside the input-tab of your field > Beautify Markup Toggles I had the same issue with imported text from an API. They were using pseudo-elements inside empty headline tags as visual spacers. 2 Link to comment Share on other sites More sharing options...
cpx3 Posted July 21, 2023 Share Posted July 21, 2023 I do not think that there is solution as TinyMCE writes that this is a feature and the editor would not work without this annoying behaviour... I wrote a function that deletes the first and the last <p>... Link to comment Share on other sites More sharing options...
wbmnfktr Posted July 21, 2023 Author Share Posted July 21, 2023 15 hours ago, ngrmm said: Remove empty paragraph texts Remove non-breaking spaces Woah... yes! They do the trick for me. These settings are hidden pretty good. @cpx3maybe you try the above mentioned setting. It works for me in my current setup. On a side note: just noticed that this issue doesn't occure in Firefox (115.0.2) and only in Chrome-/Chromium-based browsers. 1 Link to comment Share on other sites More sharing options...
cpx3 Posted July 22, 2023 Share Posted July 22, 2023 For me it did not change anything. It starts and ends with a useless <p> that destroys the layout. Link to comment Share on other sites More sharing options...
ngrmm Posted July 22, 2023 Share Posted July 22, 2023 9 hours ago, cpx3 said: For me it did not change anything. It starts and ends with a useless <p> that destroys the layout. Is it a field inside a repeater matrix? Sometimes you need to save the repeater field again, after changing the ck-editor-configs. Link to comment Share on other sites More sharing options...
cpx3 Posted July 22, 2023 Share Posted July 22, 2023 No, it is always. Whenever I paste or write a text in TinyMCE, it adds <p> and </p>... Link to comment Share on other sites More sharing options...
bernhard Posted July 22, 2023 Share Posted July 22, 2023 14 hours ago, cpx3 said: For me it did not change anything. It starts and ends with a useless <p> that destroys the layout. Are you talking about a wrapping <p>content</p> or are you talking about a trailing paragraph: ... content ... <p> </p> ? 1 Link to comment Share on other sites More sharing options...
cpx3 Posted August 1, 2023 Share Posted August 1, 2023 On 7/23/2023 at 12:36 AM, bernhard said: Are you talking about a wrapping <p>content</p> or are you talking about a trailing paragraph: ... content ... <p> </p> ? I talk about the useless additional <p>content</p> wrap. ? Link to comment Share on other sites More sharing options...
wbmnfktr Posted August 4, 2023 Author Share Posted August 4, 2023 @Pete got this message a while back: Where would I find this? I can't see it in this thread or in edit view. Link to comment Share on other sites More sharing options...
bernhard Posted August 6, 2023 Share Posted August 6, 2023 I also get these from time to time and find them quite annoying. I just delete them. Would be great to disable these emails ? 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now