Repository navigation
Releases: the-erag/text-editor-react
Releases · the-erag/text-editor-react
Release list
Release 1.1.0
What's new in 1.1.0
A bug-fix release focused on mobile layout, valid HTML output and read-only mode. No breaking API changes.
Mobile layout
- On screens 680px and narrower, the menubar and toolbar now scroll sideways in a single row instead of wrapping or hiding buttons behind "⋯".
- Menubar dropdowns and toolbar popovers (colors, alignment, lists, line height, case) open right under their button, stay inside the screen, flip above when there is no room below, and follow the button while the bar scrolls.
- Nested submenus open to the left, or shift, when they would go off screen.
- The menubar keeps its text labels on narrow editors.
Valid HTML output
- Bulleted, numbered and check lists are no longer nested inside
<p>(<p>one</p>now becomes<ul><li>one</li></ul>). - Dividers, tables, templates, pasted content and
insertHtml()split the current paragraph instead of being inserted inside it. - Turning a list off, or outdenting out of one, wraps the leftover text in a paragraph.
- Removed the stray
<span style="font-family: …">that Chrome added after list toggles and indent/outdent.
Formatting
- Font family and text color are kept after reload (they are now written as styled spans instead of
<font>). Legacy<font face|color>content is converted when loaded. - Format → Inline code now wraps the selection in
<code>(it used to create a<pre>block); running it inside inline code removes it. - Remove link works with just the caret inside the link.
- Mentions and merge tags are followed by a non-breaking space, so the next word no longer sticks to the chip at the end of a line.
Tables
- The table size picker inserts the size you click or focus, so it now works with touch and keyboard (it used to always insert 2 × 2).
- Merge cells in the menubar keeps the content of both cells.
- Table properties opens with the table's current values.
Read-only mode
- Fullscreen, Print, Word count, Copy, Select all, Preview, Source code, Shortcuts and About work while the editor is read-only. Other buttons and menu items show as disabled.
- The toolbar "More" button stays usable.
- Blocked shortcuts such as Ctrl+F go back to the browser.
Sanitizer
script,style,noscript,template,objectandembedare removed together with their content.- Images without a safe
srcare removed. - Empty
styleattributes are dropped.
Other fixes
- The page behind an open dialog no longer scrolls; long dialog lists still scroll inside. This also works with several dialogs or editors on one page.
- The status bar word count treats separate paragraphs as separate words.
Ctrl+K,Ctrl+Shift+PandCtrl+Freliably open their dialogs.- Links without a title no longer get
title="", and resized images no longer keep an emptystyleattribute.
Full changelog: v1.0.0...v1.1.0