substance
Version:
Substance is a JavaScript library for web-based content editing. It provides building blocks for realizing custom text editors and web-based publishing systems.
17 lines (11 loc) • 378 B
JavaScript
import { DocumentNode } from 'substance'
class TestNode extends DocumentNode {}
TestNode.type = 'test-node'
TestNode.schema = {
boolVal: { type: "boolean", default: false },
stringVal: { type: "string", default: "" },
arrayVal: { type: ["array","string"], default: [] },
objectVal: { type: "object", default: {} },
}
TestNode.isBlock = true
export default TestNode