📉
slate
  • Introduction
  • Walkthroughs
    • Installing Slate
    • Adding Event Handlers
    • Defining Custom Block Nodes
    • Applying Custom Formatting
    • Using Plugins
    • Saving to a Database
    • Saving and Loading HTML Content
  • Guides
    • Changes
    • Data Model
    • Plugins
    • Rendering
    • Schemas
  • General
    • Plugins
    • Resources
    • Contributing
    • Changelog
    • FAQ
    • Glossary
  • Slate Core
    • Block
    • Change
    • Data
    • Decoration
    • Document
    • Inline
    • Mark
    • Node
    • Operation
    • Point
    • Range
    • Schema
    • Selection
    • Text
    • Value
    • setKeyGenerator
    • resetKeyGenerator
  • Slate React
    • Editor
    • Plugins
    • Custom Nodes
    • Core Plugins
    • cloneFragment
    • findDOMNode
    • findDOMRange
    • findNode
    • findRange
    • getEventRange
    • getEventTransfer
    • setEventTransfer
  • Other Packages
    • slate-html-serializer
    • slate-hyperscript
    • slate-plain-serializer
    • slate-prop-types
    • slate-simulator
Powered by GitBook
On this page
  • Static Methods
  • Data.create
  • Data.fromJSON

Was this helpful?

  1. Slate Core

Data

PreviousChangeNextDecoration

Last updated 5 years ago

Was this helpful?

import { Data } from 'slate'

Data is simply a thin wrapper around , so that you don't need to ever depend on Immutable directly, and for future compatibility.

A data object can have any properties associated with it.

Static Methods

Data.create

Data.create(properties: Object) => Data

Create a data object from a plain Javascript object of properties.

Data.fromJSON

Data.fromJSON(object: Object) => Data

Create a data object from a JSON object.

Immutable.Map