@slate-serializers/html
Advanced tools
Comparing version 2.2.2 to 2.2.3
{ | ||
"name": "@slate-serializers/html", | ||
"version": "2.2.2", | ||
"version": "2.2.3", | ||
"type": "commonjs", | ||
@@ -14,3 +14,3 @@ "dependencies": { | ||
"slate-hyperscript": "^0.100.0", | ||
"@slate-serializers/dom": "2.2.2", | ||
"@slate-serializers/dom": "2.2.3", | ||
"tslib": "2.6.3" | ||
@@ -17,0 +17,0 @@ }, |
@@ -146,9 +146,14 @@ # @slate-serializers/html | ||
##### Custom configuration | ||
#### Options | ||
You can create your own configuration file that implements your schema. See [packages/html/src/lib/serializers/htmlToSlate/config/payload.ts](https://github.com/thompsonsj/slate-serializers/blob/main/packages/html/src/lib/serializers/htmlToSlate/config/payload.ts) for an example of how to extend the default configuration or copy [packages/html/src/lib/serializers/htmlToSlate/config/default.ts](https://github.com/thompsonsj/slate-serializers/blob/main/packages/html/src/lib/serializers/htmlToSlate/config/default.ts) and rewrite it as appropriate. | ||
Create your own configuration file that implements your schema. | ||
- See [packages/html/src/lib/serializers/htmlToSlate/config/payload.ts](https://github.com/thompsonsj/slate-serializers/blob/main/packages/html/src/lib/serializers/htmlToSlate/config/payload.ts) for an example of how to extend the default configuration; or | ||
- copy [packages/html/src/lib/serializers/htmlToSlate/config/default.ts](https://github.com/thompsonsj/slate-serializers/blob/main/packages/html/src/lib/serializers/htmlToSlate/config/default.ts) and rewrite it as appropriate. | ||
For more detailed documentation and examples, see [htmlToSlate | `slate-serializers`](https://thompsonsj.github.io/slate-serializers-demo/html-to-slate/docs). | ||
| Option | Description | Default | | ||
| - | - | - | | ||
| `textTags` | Define transform functions for HTML formatting elements. | See [default config](https://github.com/thompsonsj/slate-serializers/blob/main/packages/html/src/lib/serializers/htmlToSlate/config/default.ts). Example `{ i: () => ({ italic: true }), /* ... */ }`. | | ||
| `textTags` | Define transform functions for HTML formatting elements. | See [default config](https://github.com/thompsonsj/slate-serializers/blob/main/packages/html/src/lib/serializers/htmlToSlate/config/default.ts). Examples: [textTags.spec.ts](https://github.com/thompsonsj/slate-serializers/blob/main/packages/html/src/lib/tests/htmlToSlate/configuration/textTags.spec.ts). | | ||
| `elementTags` | Define transform functions for HTML element tag names. | See [default config](https://github.com/thompsonsj/slate-serializers/blob/main/packages/html/src/lib/serializers/htmlToSlate/config/default.ts). Example `{ p: () => ({ type: 'p' }), /* ... */ }`. | | ||
@@ -155,0 +160,0 @@ | `htmlPreProcessString` | Perform operations on the HTML string before serialization. | `(html) => html.replace(/<pre[^>]*>/g, '<code>').replace(/<\/pre>/g, '</code>')` | /* ... */ }`. | |
@@ -5,1 +5,2 @@ "use strict"; | ||
tslib_1.__exportStar(require("./lib/html"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -22,1 +22,2 @@ "use strict"; | ||
Object.defineProperty(exports, "slateDemoHtmlToSlateConfig", { enumerable: true, get: function () { return slateDemo_1.config; } }); | ||
//# sourceMappingURL=html.js.map |
@@ -54,1 +54,2 @@ "use strict"; | ||
}; | ||
//# sourceMappingURL=default.js.map |
@@ -17,1 +17,2 @@ "use strict"; | ||
}) }) }); | ||
//# sourceMappingURL=payload.js.map |
@@ -28,1 +28,2 @@ "use strict"; | ||
} }); | ||
//# sourceMappingURL=slateDemo.js.map |
@@ -15,7 +15,2 @@ import { Element } from 'domhandler'; | ||
export interface Config { | ||
elementAttributeMap?: { | ||
style?: { | ||
[key: string]: string; | ||
}; | ||
}; | ||
elementAttributeTransform?: AttributeTransform; | ||
@@ -22,0 +17,0 @@ elementTags: ItagMap; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=types.js.map |
@@ -164,1 +164,2 @@ "use strict"; | ||
}; | ||
//# sourceMappingURL=index.js.map |
@@ -54,1 +54,2 @@ "use strict"; | ||
}; | ||
//# sourceMappingURL=whitespace.js.map |
@@ -13,1 +13,2 @@ "use strict"; | ||
exports.slateToHtml = slateToHtml; | ||
//# sourceMappingURL=index.js.map |
@@ -71,1 +71,2 @@ "use strict"; | ||
exports.isBlock = isBlock; | ||
//# sourceMappingURL=blocks.js.map |
43045
33
162
488
+ Added@slate-serializers/dom@2.2.3(transitive)
- Removed@slate-serializers/dom@2.2.2(transitive)
Updated@slate-serializers/dom@2.2.3