fix(web): add notes node; jinja2 editor bugfix

This commit is contained in:
zhaoying
2026-03-07 14:40:43 +08:00
parent 1029f94669
commit d19fec2155
3 changed files with 8 additions and 3 deletions

View File

@@ -25,6 +25,7 @@ const InitialValuePlugin: React.FC<InitialValuePluginProps> = ({ value, options
const textContent = root.getTextContent();
if (textContent !== prevValueRef.current) {
isUserInputRef.current = true;
prevValueRef.current = textContent;
}
});
});
@@ -33,7 +34,7 @@ const InitialValuePlugin: React.FC<InitialValuePluginProps> = ({ value, options
}, [editor]);
useEffect(() => {
if ((value !== prevValueRef.current || enableLineNumbers !== prevEnableLineNumbersRef.current) && !isUserInputRef.current) {
if (value !== prevValueRef.current || enableLineNumbers !== prevEnableLineNumbersRef.current) {
queueMicrotask(() => {
editor.update(() => {
const root = $getRoot();