@progress/kendo-vue-editor
Version:
45 lines (44 loc) • 1.52 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
import { tableNodes as o, nodes as b } from "@progress/kendo-editor-common";
import { marks as i } from "@progress/kendo-editor-common";
const r = (e) => ({
[e]: {
default: null,
getFromDOM: (l) => l.getAttribute(e),
setDOMAttr: (l, a) => {
a[e] = l;
}
}
}), s = (e) => {
const l = {};
return Array.from(e.attributes).forEach((a) => {
l[a.nodeName] = a.nodeValue;
}), l;
}, u = {
...r("style"),
...r("class"),
...r("id")
}, t = o({ tableGroup: "block", cellContent: "block+", cellAttributes: u });
t.table_row.attrs = t.table_row.attrs || {};
t.table_row.attrs.style = { default: null };
t.table_row.attrs.class = { default: null };
t.table_row.attrs.id = { default: null };
t.table_row.toDOM = (e) => ["tr", e.attrs, 0];
t.table_row.parseDOM = [{ tag: "tr", getAttrs: s }];
t.table.attrs = t.table.attrs || {};
t.table.attrs.style = { default: null };
t.table.attrs.class = { default: null };
t.table.attrs.id = { default: null };
t.table.toDOM = (e) => ["table", e.attrs, ["tbody", 0]];
t.table.parseDOM = [{ tag: "table", getAttrs: s }];
const d = { ...b, ...t };
export {
i as marks,
d as nodes
};