mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 10:00:13 +01:00
This commit is contained in:
parent
7c7b73606c
commit
6278c498e8
1 changed files with 2 additions and 1 deletions
|
|
@ -21,6 +21,7 @@ import {exportImage} from "../protyle/export/util";
|
||||||
import {App} from "../index";
|
import {App} from "../index";
|
||||||
import {renderAVAttribute} from "../protyle/render/av/blockAttr";
|
import {renderAVAttribute} from "../protyle/render/av/blockAttr";
|
||||||
import {openAssetNewWindow} from "../window/openNewWindow";
|
import {openAssetNewWindow} from "../window/openNewWindow";
|
||||||
|
import {escapeHtml} from "../util/escape";
|
||||||
|
|
||||||
const bindAttrInput = (inputElement: HTMLInputElement, id: string) => {
|
const bindAttrInput = (inputElement: HTMLInputElement, id: string) => {
|
||||||
inputElement.addEventListener("change", () => {
|
inputElement.addEventListener("change", () => {
|
||||||
|
|
@ -326,7 +327,7 @@ export const openFileAttr = (attrs: IObject, focusName = "bookmark", protyle?: I
|
||||||
});
|
});
|
||||||
btnsElement[1].addEventListener("click", () => {
|
btnsElement[1].addEventListener("click", () => {
|
||||||
if (!isValidAttrName(inputElement.value)) {
|
if (!isValidAttrName(inputElement.value)) {
|
||||||
showMessage(window.siyuan.languages.attrName + " <b>" + inputElement.value + "</b> " + window.siyuan.languages.invalid);
|
showMessage(window.siyuan.languages.attrName + " <b>" + escapeHtml(inputElement.value) + "</b> " + window.siyuan.languages.invalid);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
target.parentElement.insertAdjacentHTML("beforebegin", `<div class="b3-label b3-label--noborder">
|
target.parentElement.insertAdjacentHTML("beforebegin", `<div class="b3-label b3-label--noborder">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue