Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@slate-serializers/dom

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@slate-serializers/dom - npm Package Compare versions

Comparing version 2.1.5 to 2.1.6

4

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc