Skip to content

Hyperlink Tool Strips Existing Formatting Tags #26

@arthurtsenin

Description

@arthurtsenin

Description:
When applying hyperlinks to formatted text in EditorJS, all existing HTML tags (<b>, <i>, <font>, etc.) are removed, leaving only plain text wrapped in an <a> tag.

Current Behavior:
Format text with any combination of formatting (bold, italic, color, etc.)

Example: <b><font color="red">Text</font></b>

Apply hyperlink

Result: <a href="#">Text</a> (all formatting tags are lost)

Expected Behavior:
Hyperlinks should wrap existing formatting without modification:
Expected result: <a href="#"><b><font color="red">Text</font></b></a>

Reproduction Steps:
Create formatted text in EditorJS
Select the formatted text
Use the hyperlink tool
Inspect DOM to see stripped formatting

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