1 import {ElementNode} from "./LexicalElementNode";
2 import {CommonBlockAlignment, SerializedCommonBlockNode} from "../../../nodes/_common";
5 export class CommonBlockNode extends ElementNode {
7 __alignment: CommonBlockAlignment = '';
11 const self = this.getWritable();
16 const self = this.getLatest();
20 setAlignment(alignment: CommonBlockAlignment) {
21 const self = this.getWritable();
22 self.__alignment = alignment;
25 getAlignment(): CommonBlockAlignment {
26 const self = this.getLatest();
27 return self.__alignment;
30 setInset(size: number) {
31 const self = this.getWritable();
36 const self = this.getLatest();
40 exportJSON(): SerializedCommonBlockNode {
42 ...super.exportJSON(),
44 alignment: this.__alignment,
50 export function copyCommonBlockProperties(from: CommonBlockNode, to: CommonBlockNode): void {
52 to.__alignment = from.__alignment;
53 to.__inset = from.__inset;