Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

Commit 9304310

Browse files
authored
Merge pull request #67 from michaelgmcd/master
fix #65: set both href and url properties in link data
2 parents 25fdebb + b572150 commit 9304310

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/modifiers/__test__/insertLink-test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ describe("insertLink", () => {
2323
0: {
2424
data: {
2525
href: "http://cultofthepartyparrot.com/parrots/aussieparrot.gif",
26+
url: "http://cultofthepartyparrot.com/parrots/aussieparrot.gif",
2627
title: "party",
2728
},
2829
mutability: "MUTABLE",

src/modifiers/insertLink.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const insertLink = (editorState, matchArr) => {
1414
const nextContent = currentContent.createEntity("LINK", "MUTABLE", {
1515
href,
1616
title,
17+
url: href,
1718
});
1819
const entityKey = nextContent.getLastCreatedEntityKey();
1920
let newContentState = Modifier.replaceText(

0 commit comments

Comments
 (0)