diff --git a/src/editor/dataset/constant/Element.ts b/src/editor/dataset/constant/Element.ts index fbfa8f2..3476224 100644 --- a/src/editor/dataset/constant/Element.ts +++ b/src/editor/dataset/constant/Element.ts @@ -105,7 +105,6 @@ export const CONTROL_STYLE_ATTR: Array = [ 'font', 'size', 'bold', - 'color', 'highlight', 'italic', 'strikeout' diff --git a/src/editor/interface/Control.ts b/src/editor/interface/Control.ts index 21dc6c2..ed80f5c 100644 --- a/src/editor/interface/Control.ts +++ b/src/editor/interface/Control.ts @@ -56,7 +56,6 @@ export interface IControlStyle { font?: string size?: number bold?: boolean - color?: string highlight?: string italic?: boolean strikeout?: boolean diff --git a/src/editor/utils/element.ts b/src/editor/utils/element.ts index 488b053..aa8d2fd 100644 --- a/src/editor/utils/element.ts +++ b/src/editor/utils/element.ts @@ -234,10 +234,8 @@ export function formatElementList( ) // 前后缀个性化设置 const thePrePostfixArg: Omit = { - ...controlDefaultStyle - } - if (!thePrePostfixArg.color) { - thePrePostfixArg.color = editorOptions.control.bracketColor + ...controlDefaultStyle, + color: editorOptions.control.bracketColor } // 前缀 const prefixStrList = splitText(prefix || controlOption.prefix) @@ -341,10 +339,8 @@ export function formatElementList( } else if (placeholder) { // placeholder const thePlaceholderArgs: Omit = { - ...controlDefaultStyle - } - if (editorOptions?.control?.placeholderColor) { - thePlaceholderArgs.color = editorOptions.control.placeholderColor + ...controlDefaultStyle, + color: editorOptions.control.placeholderColor } const placeholderStrList = splitText(placeholder) for (let p = 0; p < placeholderStrList.length; p++) {