Skip to content

[Feature] support background config in the text of richtext #1657

Description

@xiaoluoHe

What problem does this feature solve?

富文本中文字支持背景相关配置,包括: background,backgroundOpacity,backgroundCornerRadius

What does the proposed API look like?

export type IRichTextParagraphCharacter = IRichTextBasicCharacter & {
 ...
  // Add these attributes:
  backgroundShowMode?: 'always' | 'hover' | 'never';
  backgroundFill?: boolean | IColor; // 背景矩形填充颜色
  backgroundFillOpacity?: number; // 背景矩形填充透明度
  backgroundStroke?: boolean | IColor; // 背景矩形边框颜色
  backgroundStrokeOpacity?: number; // 背景矩形边框透明度
  backgroundRadius?: number; // 背景矩形圆角
  backgroundWidth?: number;
  backgroundHeight?: number;
};

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions