This commit is contained in:
Vanessa 2022-10-19 21:47:47 +08:00
parent f1bdb4dcfd
commit 82eafca96d
10 changed files with 14 additions and 14 deletions

View file

@ -158,7 +158,7 @@ export const setFontStyle = (textElement: HTMLElement, textOption: ITextOption)
textElement.innerText = blockRefData[2];
};
const setLink = (textOption: string) => {
const options = textOption.split(Constants.ZWSP)
const options = textOption.split(Constants.ZWSP);
textElement.setAttribute("data-href", options[0]);
textElement.removeAttribute("data-subtype");
textElement.removeAttribute("data-id");

View file

@ -39,7 +39,7 @@ export class Link extends ToolbarItem {
dataHref = clipText;
} else {
// 360
const lastSpace = clipText.lastIndexOf(' ')
const lastSpace = clipText.lastIndexOf(" ");
if (lastSpace > -1) {
if (protyle.lute.IsValidLinkDest(clipText.substring(lastSpace))) {
dataHref = clipText.substring(lastSpace);