Ghost/ghost/admin/app/components/koenig-react-editor.js
Kevin Ansfield 7a9435d524 Hooked up editor registration in react editor experiment
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
2022-07-27 14:14:12 +01:00

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}
/>
);
}
}