EditorState
§Properties
Start a transaction from this state.
§Methods
Apply the given transaction to produce a new state.
Verbose variant of apply that
returns the precise transactions that were applied (which might
be influenced by the transaction
hooks of
plugins) along with the new state.
Create a new state based on this one, but with an adjusted set
of active plugins. State fields that exist in both sets of
plugins are kept unchanged. Those that no longer exist are
dropped, and those that are new are initialized using their
init method, passing in the new
configuration object..
Serialize this state to JSON. If you want to serialize the state
of plugins, pass an object mapping property names to use in the
resulting JSON object to plugin objects. The argument may also be
a string or number, in which case it is ignored, to support the
way JSON.stringify calls toString methods.
§Static Methods
Create a new state.
Deserialize a JSON representation of a state. config should
have at least a schema field, and should contain array of
plugins to initialize the state with. pluginFields can be used
to deserialize the state of plugins, by associating plugin
instances with the property names they use in the JSON object.