mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-07 21:22:34 +01:00
🚨
This commit is contained in:
parent
f1bdb4dcfd
commit
82eafca96d
10 changed files with 14 additions and 14 deletions
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue