@flozy/editor 5.2.3 → 5.2.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -352,7 +352,7 @@ export const clearBrainText = editor => {
|
|
352
352
|
} = editor;
|
353
353
|
if (selection) {
|
354
354
|
const [currentNode, currentPath] = Editor.node(editor, selection);
|
355
|
-
const cleanedText = Node.string(currentNode).replace(/\/b(?:rain|rai|ra|r)?/g, "").trim();
|
355
|
+
const cleanedText = Node.string(currentNode).replace(/\/(?:b(?:rain|rai|ra|r)?)?/g, "").trim();
|
356
356
|
Transforms.insertText(editor, cleanedText, {
|
357
357
|
at: currentPath
|
358
358
|
});
|
@@ -18,7 +18,7 @@ export const insertBrain = (editor, data, position) => {
|
|
18
18
|
};
|
19
19
|
const [currentNode, currentPath] = Editor.node(editor, selection);
|
20
20
|
console.log('W1', Node.string(currentNode));
|
21
|
-
const cleanedText = Node.string(currentNode).replace(/\/b(?:rain|rai|ra|r)?/g, "").trim();
|
21
|
+
const cleanedText = Node.string(currentNode).replace(/\/(?:b(?:rain|rai|ra|r)?)?/g, "").trim();
|
22
22
|
if (cleanedText) {
|
23
23
|
Transforms.delete(editor, {
|
24
24
|
at: Editor.range(editor, currentPath)
|