@slate-serializers/dom
Advanced tools
Comparing version 2.1.5 to 2.1.6
{ | ||
"name": "@slate-serializers/dom", | ||
"version": "2.1.5", | ||
"version": "2.1.6", | ||
"description": "Serialize Slate JSON objects to the DOM. Can be used with `htmlparser2` and associated utilities to modify the DOM and generate HTML. Used by other serializers in this monorepo.", | ||
@@ -14,3 +14,3 @@ "type": "commonjs", | ||
"slate": "^0.94.1", | ||
"@slate-serializers/utilities": "2.1.4", | ||
"@slate-serializers/utilities": "2.1.5", | ||
"css-select": "5.1.0", | ||
@@ -17,0 +17,0 @@ "htmlparser2": "7.2.0", |
@@ -5,2 +5,3 @@ "use strict"; | ||
const domhandler_1 = require("domhandler"); | ||
const utilities_1 = require("@slate-serializers/utilities"); | ||
// Map Slate element names to HTML tag names | ||
@@ -33,2 +34,12 @@ // Staightforward transform - no attributes are considered | ||
elementMap: ELEMENT_NAME_TAG_MAP, | ||
elementAttributeTransform: ({ node }) => { | ||
if (node.align) { | ||
return { | ||
style: (0, utilities_1.styleToString)({ | ||
['text-align']: node.align, | ||
}) | ||
}; | ||
} | ||
return; | ||
}, | ||
elementTransforms: { | ||
@@ -35,0 +46,0 @@ quote: ({ children = [] }) => { |
Sorry, the diff of this file is not supported yet
32311
471
+ Added@slate-serializers/utilities@2.1.5(transitive)
- Removed@slate-serializers/utilities@2.1.4(transitive)