stable

Clone or download

Read-only

feat: add subscript support in prose-mirror editor

Add subscript mark support in prose-mirror editor. A subscript button in the toolbar allows the user to apply subscript style on selected text. There is also a shortcut available Ctrl + , A plugin has been created to prevent the user to be blocked in a mark while they writing. (Note: for now, it's only applied on subscript mark, to support other marks, you can add it in "MARK_TO_CLOSE" array) If the user writes at the end of the line in a mark, they can press "space" to close the current mark and come back to a normal style, like this : Issue : I can't <sub>123 write the end of my sentence after a mark !</sub> and have this instead : I can <sub>123</sub> write the end of my sentence after a mark ! part of story #38627 : Choice of a new Rich Text Editor Change-Id: I60d21f9670fd0a71a074123e7e03c89348926a08

Modified Files

Name
M lib/frontend/prose-mirror-editor/po/fr_FR.po +6 −0 Go to diff View file
M lib/frontend/prose-mirror-editor/src/custom_schema.ts +11 −2 Go to diff View file
A lib/frontend/prose-mirror-editor/src/plugins/close-marks-after-space/README.md +12 −0 Go to diff View file
A lib/frontend/prose-mirror-editor/src/plugins/close-marks-after-space/close-all-marks.test.ts +64 −0 Go to diff View file
A lib/frontend/prose-mirror-editor/src/plugins/close-marks-after-space/close-all-marks.ts +35 −0 Go to diff View file
A lib/frontend/prose-mirror-editor/src/plugins/close-marks-after-space/close-mark.test.ts +51 −0 Go to diff View file
A lib/frontend/prose-mirror-editor/src/plugins/close-marks-after-space/close-mark.ts +41 −0 Go to diff View file
A lib/frontend/prose-mirror-editor/src/plugins/close-marks-after-space/close-marks-after-space.ts +34 −0 Go to diff View file
A lib/frontend/prose-mirror-editor/src/plugins/close-marks-after-space/index.ts +20 −0 Go to diff View file
A lib/frontend/prose-mirror-editor/src/plugins/close-marks-after-space/marks-to-close.ts +23 −0 Go to diff View file
A lib/frontend/prose-mirror-editor/src/plugins/toolbar/helper/create-icon.ts +24 −0 Go to diff View file
M lib/frontend/prose-mirror-editor/src/plugins/toolbar/keymap.ts +2 −0 Go to diff View file
M lib/frontend/prose-mirror-editor/src/plugins/toolbar/menu.ts +2 −1 Go to diff View file
A lib/frontend/prose-mirror-editor/src/plugins/toolbar/text-transformations/index.ts +19 −0 Go to diff View file
A lib/frontend/prose-mirror-editor/src/plugins/toolbar/text-transformations/text-transformations-menu-item.ts +35 −0 Go to diff View file
M lib/frontend/prose-mirror-editor/src/use-editor.ts +2 −0 Go to diff View file