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 (16 loc) • 446 B
JavaScript
import { Component, $$ } from '../dom'
import { renderProperty } from '../editor'
export default class ListItemComponent extends Component {
render () {
const node = this.props.node
const el = $$('li').addClass('sc-list-item')
el.append(
renderProperty(this, node.getDocument(), [node.id, 'content'])
)
// for nested lists
if (this.props.children) {
el.append(this.props.children)
}
return el
}
}