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:
@@ -0,0 +1,44 @@
|
||||
import { createRegistry } from './registry';
|
||||
import {
|
||||
blockquote,
|
||||
bulletedList,
|
||||
callout,
|
||||
codeBlock,
|
||||
divider,
|
||||
heading,
|
||||
image,
|
||||
numberedList,
|
||||
paragraph,
|
||||
todoList,
|
||||
} from './blocks';
|
||||
import { bold, code, highlight, italic, link, strike, underline } from './marks';
|
||||
|
||||
/** The block definitions bundled in the default preset (registration order = menu order). */
|
||||
export const defaultBlocks = [
|
||||
paragraph,
|
||||
heading,
|
||||
blockquote,
|
||||
codeBlock,
|
||||
callout,
|
||||
bulletedList,
|
||||
numberedList,
|
||||
todoList,
|
||||
divider,
|
||||
image,
|
||||
];
|
||||
|
||||
/** The mark definitions bundled in the default preset. */
|
||||
export const defaultMarks = [bold, italic, underline, strike, highlight, code, link];
|
||||
|
||||
/** Batteries-included registry with the default blocks and marks. */
|
||||
export function createDefaultRegistry() {
|
||||
return createRegistry({ blocks: defaultBlocks, marks: defaultMarks });
|
||||
}
|
||||
|
||||
/** Lightweight registry — basic text blocks and the common marks only. */
|
||||
export function createBasicRegistry() {
|
||||
return createRegistry({
|
||||
blocks: [paragraph, heading, blockquote, bulletedList, numberedList],
|
||||
marks: [bold, italic, link],
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user