Skip to content

After formatText() modifies the style, the style is automatically turned on #2559

Open
@TheWash7

Description

@TheWash7
if (charInfo.formats['bold'] == true) {
  quillController.formatText(position, 1, Attribute.bold);
}
if (charInfo.formats['italic'] == true) {
  quillController.formatText(position, 1, Attribute.italic);
}
if (charInfo.formats['underline'] == true) {
  quillController.formatText(position, 1, Attribute.underline);
}

I want to modify the style of a certain letter, but when I use quillController.formatText to modify a letter and make it bold, the bold button on the toolbar is also highlighted, causing subsequent letters to be bold by default.

73023bc39497797f722277427859e0e1.mp4

How to avoid affecting the global style after modifying the letter style?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions