Skip to content

Commit

Permalink
🎨 fix Vanessa219#214
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 authored and stevapple committed Apr 8, 2020
1 parent 4549247 commit c22e562
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/ts/wysiwyg/highlightToolbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -669,13 +669,9 @@ export const highlightToolbar = (vditor: IVditor) => {
input.className = "vditor-input";
input.setAttribute("placeholder", "ID" + "<" + updateHotkeyTip("⌥-Enter") + ">");
input.style.width = "120px";
input.value = headingElement.getAttribute("id");
input.value = headingElement.getAttribute("data-id") || "";
input.oninput = () => {
if (input.value.trim() !== "") {
headingElement.id = input.value;
} else {
headingElement.removeAttribute("id");
}
headingElement.setAttribute("data-id", input.value);
};
input.onkeydown = (event) => {
if (event.isComposing) {
Expand Down

0 comments on commit c22e562

Please sign in to comment.