mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-20 02:34:52 +00:00
4.7.1-alpha (#1120)
Co-authored-by: heheer <71265218+newfish-cmyk@users.noreply.github.com>
This commit is contained in:
@@ -209,9 +209,8 @@ export function editorStateToText(editor: LexicalEditor) {
|
||||
const stringifiedEditorState = JSON.stringify(editor.getEditorState().toJSON());
|
||||
const parsedEditorState = editor.parseEditorState(stringifiedEditorState);
|
||||
const editorStateTextString = parsedEditorState.read(() => $getRoot().getTextContent());
|
||||
const compressedText = editorStateTextString.replace(/\n+/g, '\n\n');
|
||||
|
||||
return compressedText;
|
||||
return editorStateTextString;
|
||||
}
|
||||
|
||||
const varRegex = /\{\{([a-zA-Z_][a-zA-Z0-9_]*)\}\}/g;
|
||||
|
Reference in New Issue
Block a user