From a65f92893278eeb74066252b6650c707dcca0dc4 Mon Sep 17 00:00:00 2001 From: "Fabien \"egg\" O'Carroll" Date: Wed, 19 Apr 2023 12:24:38 +0100 Subject: [PATCH] Added support for viewing different revisions The Lexical editor isn't passed the editor state it's passed the _initial_ editor state, which means that subsequent renders will not use an updated state. To work around this we store a reference to the editor api and manually set the state ourselves when the selected revision is changed. --- .../app/components/modal-post-history.hbs | 10 +- .../app/components/modal-post-history.js | 102 +++++++++++------- 2 files changed, 71 insertions(+), 41 deletions(-) diff --git a/ghost/admin/app/components/modal-post-history.hbs b/ghost/admin/app/components/modal-post-history.hbs index 61326dbf3d..2b8a4d105c 100644 --- a/ghost/admin/app/components/modal-post-history.hbs +++ b/ghost/admin/app/components/modal-post-history.hbs @@ -18,11 +18,11 @@ {{/if}}
{{this.currentTitle}}
- +
@@ -43,9 +43,9 @@