mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-20 06:01:24 +02:00
Add options params to Base64 deserialize, deserializeNode and serialize method
This commit is contained in:
@@ -34,9 +34,9 @@ function decode(string) {
|
|||||||
* @return {State}
|
* @return {State}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function deserialize(string) {
|
function deserialize(string, options) {
|
||||||
const raw = decode(string)
|
const raw = decode(string)
|
||||||
const state = Raw.deserialize(raw)
|
const state = Raw.deserialize(raw, options)
|
||||||
return state
|
return state
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,9 +47,9 @@ function deserialize(string) {
|
|||||||
* @return {Node}
|
* @return {Node}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function deserializeNode(string) {
|
function deserializeNode(string, options) {
|
||||||
const raw = decode(string)
|
const raw = decode(string)
|
||||||
const node = Raw.deserializeNode(raw)
|
const node = Raw.deserializeNode(raw, options)
|
||||||
return node
|
return node
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,8 +60,8 @@ function deserializeNode(string) {
|
|||||||
* @return {String}
|
* @return {String}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function serialize(state) {
|
function serialize(state, options) {
|
||||||
const raw = Raw.serialize(state)
|
const raw = Raw.serialize(state, options)
|
||||||
const encoded = encode(raw)
|
const encoded = encode(raw)
|
||||||
return encoded
|
return encoded
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user