Add tooltip for WYSIWYG callout link (#16967)

This commit is contained in:
Chris LaFreniere
2021-09-01 17:24:06 -07:00
committed by GitHub
parent d8980ea711
commit b27bdb0027

View File

@@ -244,7 +244,7 @@ export class MarkdownToolbarComponent extends AngularDisposable {
let linkUrl = notebookLink.getLinkUrl();
// Otherwise, re-focus on the output element, and insert the link directly.
this.output?.nativeElement?.focus();
document.execCommand('insertHTML', false, `<a href="${escape(linkUrl)}" is-absolute=${notebookLink.isAbsolutePath}>${escape(linkCalloutResult?.insertUnescapedLinkLabel)}</a>`);
document.execCommand('insertHTML', false, `<a href="${escape(linkUrl)}" title="${escape(linkUrl)}" is-absolute=${notebookLink.isAbsolutePath}>${escape(linkCalloutResult?.insertUnescapedLinkLabel)}</a>`);
return;
}
} else if (type === MarkdownButtonType.IMAGE_PREVIEW) {