How to use the slate-plain-serializer.default function in slate-plain-serializer

To help you get started, we’ve selected a few slate-plain-serializer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ianstormtaylor / slate / benchmark / slate-plain-serializer / plain-serializer / deserialize.js View on Github external
/** @jsx h */
/* eslint-disable react/jsx-key */

const Plain = require('slate-plain-serializer').default

const input = `
  This is editable plain text, just like a text area.
`
  .trim()
  .repeat(10)

module.exports.input = input

module.exports.default = function(string) {
  Plain.deserialize(string)
}
github ianstormtaylor / slate / benchmark / slate-plain-serializer / plain-serializer / serialize.js View on Github external
/** @jsx h */
/* eslint-disable react/jsx-key */

const Plain = require('slate-plain-serializer').default
const h = require('../../helpers/h')

module.exports.default = function(state) {
  Plain.serialize(state)
}

module.exports.input = (
  
    
      {Array.from(Array(10)).map(() => (
        
          
            
              This is editable <b>rich</b> text, <i>much</i> better than a
              textarea!