You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a custom JavaScript function to trim the link:
function trimLink(link) {
return link.trim();
}
Modify the "insertLink" function in the Markdown Editor to call the "trimLink" function:
function insertLink() {
var link = prompt("Enter the link URL:");
if (link) {
link = trimLink(link);
var text = prompt("Enter the link text:");
if (text) {
text = trimLink(text);
var selection = getSelection();
var range = selection.getRangeAt(0);
var node = document.createElement("a");
node.setAttribute("href", link);
node.textContent = text;
range.insertNode(node);
}
}
}
When using the toolbar button for adding an hyperlink it always includes an extra whitespace directly after the hyperlink.
Attaching 2 screenshots which show the issue.
The text was updated successfully, but these errors were encountered: