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 system. It is developed to power our online editing platform [Substance](http://substance.io).
18 lines (15 loc) • 855 B
JavaScript
import { Registry, ParagraphPackage, HeadingPackage, InlineWrapperPackage } from 'substance'
import TestContainerComponent from './TestContainerComponent'
import TestStructuredNodeComponent from './TestStructuredNodeComponent'
const ParagraphComponent = ParagraphPackage.ParagraphComponent
const HeadingComponent = HeadingPackage.HeadingComponent
const InlineWrapperComponent = InlineWrapperPackage.InlineWrapperComponent
export default function createTestComponentRegistry () {
var componentRegistry = new Registry()
componentRegistry.add('paragraph', ParagraphComponent)
componentRegistry.add('heading', HeadingComponent)
componentRegistry.add('body', TestContainerComponent)
componentRegistry.add('structured-node', TestStructuredNodeComponent)
componentRegistry.add('inline-wrapper', InlineWrapperComponent)
return componentRegistry
}