From 6f68fc63fda638cbf4aa5c3883b5b2b6d58ff90a Mon Sep 17 00:00:00 2001 From: Rainer Simon Date: Thu, 12 Aug 2021 14:04:16 +0200 Subject: [PATCH] Added API method to get current annotation editing state --- src/editor/Editor.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/editor/Editor.jsx b/src/editor/Editor.jsx index ad6e402..8f47954 100644 --- a/src/editor/Editor.jsx +++ b/src/editor/Editor.jsx @@ -106,6 +106,9 @@ export default class Editor extends Component { return meta; } + getCurrentAnnotation = () => + this.state.currentAnnotation.clone(); + /** Shorthand **/ updateCurrentAnnotation = (diff, saveImmediately) => this.setState({ currentAnnotation: this.state.currentAnnotation.clone(diff)