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 systems.
33 lines (28 loc) • 782 B
JavaScript
import { Component, TextPropertyEditor } from 'substance'
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(
$$(TextPropertyEditor, {
disabled: this.props.disabled,
path: [node.id, 'body']
}).ref('bodyEditor')
)
el.append(
$$(TextPropertyEditor, {
disabled: this.props.disabled,
path: [node.id, 'caption']
}).ref('captionEditor')
)
return el
}
}
TestStructuredNodeComponent.fullWidth = true
export default TestStructuredNodeComponent