mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-20 23:36:10 +01:00
This commit is contained in:
parent
93dafd1c12
commit
a5b386644b
1 changed files with 1 additions and 1 deletions
|
|
@ -1684,7 +1684,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
if (localFiles.length > 0) {
|
||||
let fileText = "";
|
||||
localFiles.forEach((item) => {
|
||||
fileText += `[${path.basename(item)}](file://${item})\n`;
|
||||
fileText += `[${path.basename(item).replace(/\]/g, "\\]").replace(/\[/g, "\\[")}](file://${item.replace(/\\/g, "\\\\").replace(/\)/g, "\\)").replace(/\(/g, "\\(")})\n`;
|
||||
});
|
||||
insertHTML(protyle.lute.SpinBlockDOM(fileText), protyle);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue