From 6d74559a0fb96971ab1659a83d4949041109541f Mon Sep 17 00:00:00 2001 From: hanshiyang Date: Thu, 4 Jun 2026 15:53:41 +0800 Subject: [PATCH] feat: preserve ocd value ids --- src/editor/dataset/constant/Element.ts | 1 + src/utils/ocd.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/editor/dataset/constant/Element.ts b/src/editor/dataset/constant/Element.ts index 58a21ab..3f51039 100644 --- a/src/editor/dataset/constant/Element.ts +++ b/src/editor/dataset/constant/Element.ts @@ -39,6 +39,7 @@ export const EDITOR_ELEMENT_COPY_ATTR: Array = [ ] export const EDITOR_ELEMENT_ZIP_ATTR: Array = [ + 'id', 'type', 'font', 'size', diff --git a/src/utils/ocd.ts b/src/utils/ocd.ts index 0d3a791..4c52de7 100644 --- a/src/utils/ocd.ts +++ b/src/utils/ocd.ts @@ -3,7 +3,7 @@ import { IEditorData } from '../editor' const CONFLICT_MARKER_HIGHLIGHT = '#fff3cd' const CONFLICT_MARKER_COLOR = '#b42318' -const CONFLICT_MARKER_REG = /^(<<<<<<<|=======|>>>>>>>)\b/ +const CONFLICT_MARKER_REG = /^(<<<<<<<|=======|>>>>>>>).*/ type UnknownRecord = Record