world-game/site/plugins/custom-marks/index.js
2026-01-14 16:25:06 +01:00

32 lines
834 B
JavaScript

panel.plugin("custom/marks", {
writerMarks: {
green: {
button: {
icon: "brush",
label: "Vert"
},
commands() {
return () => this.toggle();
},
name: "green",
schema: {
parseDOM: [{ tag: "span.green" }],
toDOM: () => ["span", { class: "green" }, 0]
}
},
pixel: {
button: {
icon: "grid-full",
label: "Pixel"
},
commands() {
return () => this.toggle();
},
name: "pixel",
schema: {
parseDOM: [{ tag: "span.pixel" }],
toDOM: () => ["span", { class: "pixel" }, 0]
}
}
}
});