mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Wired up top-of-document handling in Lexical editor
closes https://github.com/TryGhost/Team/issues/2285 - added passthrough of `cursorDidExitAtTop` action so the editor can trigger title input focus on key commands that trigger the cursor to leave the top of document
This commit is contained in:
parent
a51f3a124d
commit
a855973ac6
2 changed files with 8 additions and 2 deletions
|
@ -40,6 +40,7 @@
|
|||
@lexical={{@body}}
|
||||
@onChange={{@onBodyChange}}
|
||||
@registerAPI={{this.registerEditorAPI}}
|
||||
@cursorDidExitAtTop={{this.focusTitle}}
|
||||
/>
|
||||
|
||||
{{!-- <KoenigEditor
|
||||
|
|
|
@ -149,8 +149,13 @@ export default class KoenigLexicalEditor extends Component {
|
|||
<KoenigComposer
|
||||
initialEditorState={this.args.lexical}
|
||||
onError={this.onError}
|
||||
imageUploadFunction={{imageUploader, uploadProgress}} >
|
||||
<KoenigEditor onChange={this.args.onChange} registerAPI={this.args.registerAPI} />
|
||||
imageUploadFunction={{imageUploader, uploadProgress}}
|
||||
>
|
||||
<KoenigEditor
|
||||
onChange={this.args.onChange}
|
||||
registerAPI={this.args.registerAPI}
|
||||
cursorDidExitAtTop={this.args.cursorDidExitAtTop}
|
||||
/>
|
||||
</KoenigComposer>
|
||||
</Suspense>
|
||||
</ErrorHandler>
|
||||
|
|
Loading…
Add table
Reference in a new issue