Skip to content

[WC-3274] fix: hyperlink does not read attribute from clipboard#2096

Open
gjulivan wants to merge 1 commit intomainfrom
rte-update-4-11-2
Open

[WC-3274] fix: hyperlink does not read attribute from clipboard#2096
gjulivan wants to merge 1 commit intomainfrom
rte-update-4-11-2

Conversation

@gjulivan
Copy link
Collaborator

Pull request type


Description

@gjulivan gjulivan requested a review from a team as a code owner February 16, 2026 11:14
@gjulivan gjulivan changed the title fix: hyperlink does not read attribute from clipboard [WC-3274] fix: hyperlink does not read attribute from clipboard Feb 16, 2026
function matchLink(node: HTMLElement, _delta: Delta): Delta {
const href = node.getAttribute("href");
const text = node.textContent || href || "";
const title = node.getAttribute("title") || text;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if title was not there - keep it empty, no need to place text there.

const href = node.getAttribute("href");
const text = node.textContent || href || "";
const title = node.getAttribute("title") || text;
const target = node.getAttribute("target") || "_blank";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same with target, do we really want to have a default value there or is it alright to keep it empty if it was originally empty?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments