Skip to content

Commit

Permalink
tiff#42 Specify text of a hyper link when using the createLink command
Browse files Browse the repository at this point in the history
  • Loading branch information
jhollingworth committed Apr 15, 2012
1 parent 5979a9e commit 9fe6182
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/createLink.js
Expand Up @@ -56,7 +56,7 @@
hasElementChild = !!anchor.querySelector("*");
isEmpty = textContent === "" || textContent === wysihtml5.INVISIBLE_SPACE;
if (!hasElementChild && isEmpty) {
dom.setTextContent(anchor, anchor.href);
dom.setTextContent(anchor, attributes.text || anchor.href);
whiteSpace = doc.createTextNode(" ");
wysihtml5.selection.setAfter(anchor);
wysihtml5.selection.insertNode(whiteSpace);
Expand Down

0 comments on commit 9fe6182

Please sign in to comment.