MCPcopy Create free account
hub / github.com/docusealco/docuseal / createBlockNode

Function createBlockNode

app/javascript/template_builder/dynamic_editor.js:141–159  ·  view source on GitHub ↗
(name, tag, content, extra = {})

Source from the content-addressed store, hash-verified

139}
140
141function createBlockNode (name, tag, content, extra = {}) {
142 return Node.create({
143 name,
144 group: 'block',
145 content: content || 'block+',
146 ...extra,
147 addAttributes () {
148 return {
149 htmlAttrs: { default: {} }
150 }
151 },
152 parseHTML () {
153 return [{ tag, getAttrs: collectDomAttrs }]
154 },
155 renderHTML ({ node }) {
156 return [tag, node.attrs.htmlAttrs, 0]
157 }
158 })
159}
160
161const CustomParagraph = Node.create({
162 name: 'paragraph',

Callers 1

dynamic_editor.jsFile · 0.85

Calls 1

createMethod · 0.45

Tested by

no test coverage detected