Revert "Fixes formatted description in email " (#7917)

This commit is contained in:
Omar López authored and GitHub committed 2023-03-23 21:20:35 +00:00
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(/&lt;/g, "<").replace(/&gt;/g, ">");
props.setText(DOMPurify.sanitize(textInHtml));
const textInHtml = $generateHtmlFromNodes(editor);
props.setText(textInHtml);
});
if (!prevEditorState._selection) editor.blur();
});