mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-05 09:50:34 +03:00
7a9435d524
no issue - use the `didCreateEditor` hook to register the editor instance as we do with our Ember version of Koenig - allows for initial handling of focus control for moving cursor between title and body inputs - disabled card cleanup call because the react editor does not yet have cards or the custom `cleanup()` method
18 lines
524 B
JavaScript
18 lines
524 B
JavaScript
import ReactComponent from './react-component';
|
|
import ReactMobiledocEditor from './react-mobiledoc-editor';
|
|
import {action} from '@ember/object';
|
|
|
|
export default class KoenigReactEditor extends ReactComponent {
|
|
@action
|
|
renderComponent(element) {
|
|
this.reactRender(
|
|
element,
|
|
<ReactMobiledocEditor
|
|
mobiledoc={this.args.mobiledoc}
|
|
didCreateEditor={this.args.didCreateEditor}
|
|
onChange={this.args.onChange}
|
|
/>
|
|
);
|
|
}
|
|
}
|