0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Added mobiledoc change handling to react-editor experiment

no issue

- passed through the `onChange` event handler so that changes to the content are updated in Ember and autosave etc is triggered
This commit is contained in:
Kevin Ansfield 2022-07-26 14:42:59 +01:00
parent 873a2ff8e3
commit b5b88e7c5e
3 changed files with 3 additions and 0 deletions

View file

@ -37,6 +37,7 @@
<KoenigReactEditor
@mobiledoc={{@body}}
@onChange={{@onBodyChange}}
/>
{{!-- <KoenigEditor

View file

@ -9,6 +9,7 @@ export default class KoenigReactEditor extends ReactComponent {
element,
<ReactMobiledocEditor
mobiledoc={this.args.mobiledoc}
onChange={this.args.onChange}
/>
);
}

View file

@ -77,6 +77,7 @@ export default function ReactMobiledocEditorComponent(props) {
<Suspense fallback={<p>Loading editor...</p>}>
<Koenig
mobiledoc={props.mobiledoc}
onChange={props.onChange}
/>
</Suspense>
</ErrorHandler>