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).
30 lines (27 loc) • 776 B
JavaScript
import { Component, TextPropertyEditor, ContainerEditor } from 'substance'
export default class TestStructuredNodeComponent extends Component {
render ($$) {
var node = this.props.node
var el = $$('div').addClass('sc-structured-node')
el.append(
$$(TextPropertyEditor, {
disabled: this.props.disabled,
path: [node.id, 'title']
}).ref('titleEditor')
)
el.append(
$$(ContainerEditor, {
disabled: this.props.disabled,
containerPath: [node.id, 'body']
}).ref('bodyEditor')
)
el.append(
$$(TextPropertyEditor, {
disabled: this.props.disabled,
path: [node.id, 'caption']
}).ref('captionEditor')
)
return el
}
}
TestStructuredNodeComponent.fullWidth = true