slate-plain-serializer
Last updated
Last updated
A serializer that converts a Slate to and from a plain text string.
Plain.deserialize
Plain.deserialize(string: String, [options: Object]) => Value
Deserialize a plain text string
into a . A series of blocks will be created by splitting the input string on \n
characters. Each block is given a type of 'line'
.
If you pass toJSON: true
as an option, the return value will be a JSON object instead of a object.
Plain.serialize
Plain.serialize(value: Value) => String
Serialize a value
into a plain text string. Each direct child block of the document will be separated by a \n
character.