🎨 前端限定 window.siyuan.config.editor.blockRefDynamicAnchorTextMaxLen

This commit is contained in:
Vanessa 2022-10-30 23:03:26 +08:00
parent 998665a171
commit 174eb89910
2 changed files with 3 additions and 3 deletions

View file

@ -177,6 +177,6 @@ export const newFileBySelect = (fileName: string, protyle: IProtyle) => {
title: newName,
md: ""
}, () => {
insertHTML(genEmptyBlock(false, false, `<span data-type="block-ref" data-id="${id}" data-subtype="d">${escapeHtml(newName)}</span>`), protyle);
insertHTML(genEmptyBlock(false, false, `<span data-type="block-ref" data-id="${id}" data-subtype="d">${escapeHtml(newName.substring(0, window.siyuan.config.editor.blockRefDynamicAnchorTextMaxLen))}</span>`), protyle);
});
};