Revert "Fixes formatted description in email " (#7917)
This commit is contained in:
1 parent
47e13cd2fd
commit
9ab196c30e
23 files changed
+379
-699
No files matched your search
@@ -12,7 +12,6 @@ import { $createHeadingNode, $isHeadingNode } from "@lexical/rich-text";
|
||||
import { $isAtNodeEnd, $wrapNodes } from "@lexical/selection";
|
||||
import { $getNearestNodeOfType, mergeRegister } from "@lexical/utils";
|
||||
import classNames from "classnames";
|
||||
import DOMPurify from "dompurify";
|
||||
import type { EditorState, GridSelection, LexicalEditor, NodeSelection, RangeSelection } from "lexical";
|
||||
import {
|
||||
$createParagraphNode,
|
||||
@@ -352,8 +351,8 @@ export default function ToolbarPlugin(props: TextEditorProps) {
|
||||
|
||||
editor.registerUpdateListener(({ editorState, prevEditorState }) => {
|
||||
editorState.read(() => {
|
||||
const textInHtml = $generateHtmlFromNodes(editor).replace(/</g, "<").replace(/>/g, ">");
|
||||
props.setText(DOMPurify.sanitize(textInHtml));
|
||||
const textInHtml = $generateHtmlFromNodes(editor);
|
||||
props.setText(textInHtml);
|
||||
});
|
||||
if (!prevEditorState._selection) editor.blur();
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user