fix: add new styling for emoji links (#14481)
This commit is contained in:
1 parent
4aeb6b7c9b
commit
8bb5200dd8
6 files changed
+57
-25
No files matched your search
@@ -376,7 +376,12 @@ export default function ToolbarPlugin(props: TextEditorProps) {
|
||||
editor.registerUpdateListener(({ editorState, prevEditorState }) => {
|
||||
editorState.read(() => {
|
||||
const textInHtml = $generateHtmlFromNodes(editor).replace(/</g, "<").replace(/>/g, ">");
|
||||
props.setText(textInHtml);
|
||||
props.setText(
|
||||
textInHtml.replace(
|
||||
/<p\s+class="editor-paragraph"[^>]*>\s*<br>\s*<\/p>/g,
|
||||
"<p class='editor-paragraph'></p>"
|
||||
)
|
||||
);
|
||||
});
|
||||
if (!prevEditorState._selection) editor.blur();
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user