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.