Documentation
¶
Overview ¶
Package editorjs implements the alternative Editor.js WYSIWYG provider — example T23 / SPEC V10. Editor.js is a block-style editor from codex-team (Apache-2.0).
This implementation handles the canonical Editor.js v2 block shape:
{
"time": 1701000000,
"blocks": [
{"type":"paragraph","data":{"text":"Hello"}},
{"type":"header","data":{"text":"Section","level":2}},
{"type":"list","data":{"style":"unordered","items":["a","b"]}},
{"type":"image","data":{"file":{"url":"/m/1/a.png"},"caption":"x"}}
],
"version": "2.x"
}
Rendering is intentionally narrow — Editor.js supports many block types via plugins; this covers paragraph + header + list + image.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct{}
Provider implements editor.Provider for Editor.js.
func (*Provider) EmptyBlocks ¶
func (p *Provider) EmptyBlocks() json.RawMessage
EmptyBlocks implements editor.Provider.
func (*Provider) FrontendBundleID ¶
FrontendBundleID implements editor.Provider.
Click to show internal directories.
Click to hide internal directories.