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).
22 lines (18 loc) • 415 B
JavaScript
import { Component } from '../dom'
export default class PropertyComponent extends Component {
didMount () {
const path = this.getPath()
this.context.editorState.addObserver(['document'], this.rerender, this, {
document: {
path
},
stage: 'render'
})
}
dispose () {
this.context.editorState.off(this)
}
getPath () {
throw new Error('Not implemented.')
}
}