feat(writekit): rename @robonen/editor to @robonen/writekit

Rename the rich-text editor package and all Editor* exports to Writekit*;
remove the old vue/editor tree.
This commit is contained in:
2026-06-15 16:54:06 +07:00
parent 55e78786d6
commit 263c32002f
149 changed files with 1563 additions and 1748 deletions
+18
View File
@@ -0,0 +1,18 @@
import { defineBlock } from '../registry';
const LEVELS = [1, 2, 3, 4, 5, 6] as const;
export const heading = defineBlock({
type: 'heading',
spec: {
content: { kind: 'text' },
group: 'block',
attrs: {
level: { default: 1, validate: value => typeof value === 'number' && value >= 1 && value <= 6 },
},
toDOM: node => [`h${node.attrs['level'] ?? 1}`, 0],
parseDOM: LEVELS.map(level => ({ tag: `h${level}`, attrs: { level } })),
},
inputRules: LEVELS.map(level => ({ match: new RegExp(`^#{${level}}\\s$`), attrs: { level } })),
meta: { title: 'Heading', icon: 'heading', keywords: ['heading', 'title', 'h1', 'h2', 'h3'], group: 'basic' },
});