You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Long words can currently exceed the editor area - to be observed mainly in Firefox and especially with rather small areas.
Instead, the content should always be wrapped at the end of the line (as it behaves in a native text field).
This can easily be achieved with word-break: break-word1 applied to all "contenteditable" elements.
With this, paragraph wrapping will still behave the same (see "Lorem Ipsum" example below) and, for example, content in tables becomes cleaner and better aligned automatically.
Some plugins appear to have recognized this issue and are addressing it individually at the moment, for example @editorjs/nested-list2.
However, this is something that should be addressed in core by default for all block tools.
@neSpecc Sorry for the ping, but is there anything I can do to get this over the line? Would you like me to create an issue first? Seems like a pretty straightforward fix to me 😇 Thanks for your work! ❤️
I’ve tested your demo and wasn’t able to reproduce most of the problems, only in the Checklist tool. Is it reproducible for you when using yarn dev?
Screenshot from the next branch
Oh, interesting! Turns out that it's mainly an issue in Firefox. Chrome and Safari seem to apply built-in browser styles that prevent the overflow. However, I guess it doesn't hurt to apply word-break: break-word in every case, especially since it fixes the overflow of the checklist in both Chrome and Safari. WDYT?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Long words can currently exceed the editor area - to be observed mainly in Firefox and especially with rather small areas.
Instead, the content should always be wrapped at the end of the line (as it behaves in a native text field).
This can easily be achieved with
word-break: break-word1 applied to all "contenteditable" elements.With this, paragraph wrapping will still behave the same (see "Lorem Ipsum" example below) and, for example, content in tables becomes cleaner and better aligned automatically.
Some plugins appear to have recognized this issue and are addressing it individually at the moment, for example
@editorjs/nested-list2.However, this is something that should be addressed in core by default for all block tools.
Fixes #2931 and would also fix editor-js/paragraph#57 (external).
Repro
With repo demo (
yarn dev), in "thin mode".JSON
{ "time" : 1712353636687, "blocks" : [ { "id" : "zcKCF1S7X8", "type" : "header", "data" : { "text" : "Supercalifragilisticexpialidocious", "level" : 1 } }, { "id" : "FLD-mZIRX7", "type" : "paragraph", "data" : { "text" : "<b>Muvaffakiyetsizleştiricileştiriveremeyebileceklerimizdenmişsinizcesine</b>" } }, { "id" : "w2bhqGcgbp", "type" : "table", "data" : { "withHeadings" : false, "content" : [ [ "Sünnipäevanädalalõpupeopärastlõunaväsimatus", "Sünnipäevanädalalõpupeopärastlõunaväsimatus" ] ] } }, { "id" : "rkjqTuHxOZ", "type" : "list", "data" : { "style" : "unordered", "items" : [ { "content" : "miinibaashkiminasiganibiitoosijiganibadagwiingweshiganibakwezhigan", "items" : [] } ] } }, { "id" : "dxDWr_Fqgf", "type" : "checklist", "data" : { "items" : [ { "text" : "vaðlaheiðarvegavinnuverkfærageymsluskúraútidyralyklakippuhringur", "checked" : false } ] } }, { "id" : "bwnFX5LoX7", "type" : "paragraph", "data" : { "text" : "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do \neiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad \nminim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip \nex ea commodo consequat. Duis aute irure dolor in reprehenderit in \nvoluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur \nsint occaecat cupidatat non proident, sunt in culpa qui officia deserunt\n mollit anim id est laborum." } } ], "version" : "2.30.0-rc.2" }Before
After
Footnotes
https://developer.mozilla.org/en-US/docs/Web/CSS/word-break ↩
https://github.com/editor-js/nested-list/blob/95b37462dc93c19b83f0481f509034a40d436cf2/styles/index.pcss#L27 ↩