From c7d054406c7b4d449b96009c15dec1523667391e Mon Sep 17 00:00:00 2001 From: jos Date: Mon, 21 Jan 2019 20:56:50 +0100 Subject: [PATCH] Make the method `refresh()` public --- HISTORY.md | 1 + docs/api.md | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/HISTORY.md b/HISTORY.md index e0a0fd4..9425216 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -10,6 +10,7 @@ https://github.com/josdejong/jsoneditor - Implemented new option `onClassName`, allowing customized and dynamic styling of nodes. See 20_custom_css_style_for_nodes.html for a demo. Thanks @maestr0. +- Make the method `refresh()` public. ## 2019-01-16, version 5.27.1 diff --git a/docs/api.md b/docs/api.md index 201ebc1..d002499 100644 --- a/docs/api.md +++ b/docs/api.md @@ -516,6 +516,12 @@ Get the current selected text with the selection range, Only applicable for mode - `{start:{row:Number, column:Number},end:{row:Number, column:Number},text:String} selection` + +#### `JSONEditor.refresh()` + +Force the editor to refresh the user interface and update all rendered HTML. This can be useful for example when using `onClassName` and the returned class name depends on external factors. + + #### `JSONEditor.set(json)` Set JSON data.