collapse by default in node-edit mode
This commit is contained in:
parent
4aa5d7e326
commit
5fd477d074
1 changed files with 7 additions and 4 deletions
|
|
@ -78,11 +78,14 @@ export const Details = Node.create<DetailsOptions>({
|
|||
dom.setAttribute("data-type", this.name);
|
||||
btn.setAttribute("data-type", `${this.name}Button`);
|
||||
div.setAttribute("data-type", `${this.name}Container`);
|
||||
|
||||
if (editor.isEditable) {
|
||||
if (node.attrs.open) {
|
||||
dom.setAttribute("open", "true");
|
||||
} else {
|
||||
dom.removeAttribute("open");
|
||||
}
|
||||
}
|
||||
|
||||
ico.innerHTML = icon("right-line");
|
||||
btn.addEventListener("click", () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue