slate-serializers
Advanced tools
Comparing version 0.0.27 to 0.0.28
@@ -0,2 +1,3 @@ | ||
import { Descendant } from 'slate'; | ||
import { Config } from '../../config/htmlToSlate/types'; | ||
export declare const htmlToSlate: (html: string, config?: Config) => undefined; | ||
export declare const htmlToSlate: (html: string, config?: Config) => Descendant[]; |
@@ -106,3 +106,3 @@ "use strict"; | ||
const htmlToSlate = (html, config = default_1.config) => { | ||
let slateContent; | ||
let slateContent = []; | ||
const handler = new domhandler_1.DomHandler((error, dom) => { | ||
@@ -109,0 +109,0 @@ if (error) { |
{ | ||
"name": "slate-serializers", | ||
"version": "0.0.27", | ||
"version": "0.0.28", | ||
"description": "Serialize Slate JSON objects to HTML and vice versa. Define rules to modify the end result.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -91,3 +91,3 @@ # slate-serializers | ||
You can create your own configuration file that implements your schema. See [src/config/slatetoDom/payload.ts](src/config/slatetoDom/payload.ts) for an example of how to extend the default configuration or copy [src/config/slatetoDom/default.ts](src/config/slatetoDom/default.ts) and rewrite it as appropriate. | ||
You can create your own configuration file that implements your schema. See [src/config/slateToDom/payload.ts](src/config/slateToDom/payload.ts) for an example of how to extend the default configuration or copy [src/config/slateToDom/default.ts](src/config/slateToDom/default.ts) and rewrite it as appropriate. | ||
@@ -94,0 +94,0 @@ ### htmlToSlate |
38659
898