mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-23 07:22:55 +02:00
Add options to Base64 serializeNode
This commit is contained in:
@@ -215,7 +215,7 @@ class Node extends React.Component {
|
||||
|
||||
onDragStart = (e) => {
|
||||
const { node } = this.props
|
||||
const encoded = Base64.serializeNode(node)
|
||||
const encoded = Base64.serializeNode(node, { preserveKeys: true })
|
||||
const data = e.nativeEvent.dataTransfer
|
||||
data.setData(TYPES.NODE, encoded)
|
||||
|
||||
|
@@ -73,8 +73,8 @@ function serialize(state) {
|
||||
* @return {String}
|
||||
*/
|
||||
|
||||
function serializeNode(node) {
|
||||
const raw = Raw.serializeNode(node)
|
||||
function serializeNode(node, options) {
|
||||
const raw = Raw.serializeNode(node, options)
|
||||
const encoded = encode(raw)
|
||||
return encoded
|
||||
}
|
||||
|
Reference in New Issue
Block a user