UNPKG

draft-js-ast-exporter

Version:

Export content from draft-js into an abstract syntax tree.

110 lines (109 loc) 2.23 kB
export default { "entityMap": { "0": { "type": "image", "mutability": "IMMUTABLE", "data": { "src": "http://placekitten.com/500/300", "caption": "Image caption", "rightsHolder": "Copyright Place Kitten", "featured": "big" } }, "1": { "type": "LINK", "mutability": "MUTABLE", "data": { "url": "https://github.com/icelab/draft-js-ast-exporter" } } }, "blocks": [ { "key": "ag6qs", "text": "DraftJS AST Exporter", "type": "header-two", "depth": 0, "inlineStyleRanges": [], "entityRanges": [], "data": {} }, { "key": "59kd9", "text": "In your draft-js, exporting your content:", "type": "unstyled", "depth": 0, "inlineStyleRanges": [ { "offset": 18, "length": 9, "style": "BOLD" }, { "offset": 33, "length": 7, "style": "ITALIC" } ], "entityRanges": [], "data": {} }, { "key": "bqjdr", "text": "From draft-js internals", "type": "ordered-list-item", "depth": 0, "inlineStyleRanges": [], "entityRanges": [], "data": {} }, { "key": "1pdm1", "text": "To an abstract syntax tree", "type": "ordered-list-item", "depth": 0, "inlineStyleRanges": [], "entityRanges": [], "data": {} }, { "key": "1sd0p", "text": "Extensibility.", "type": "ordered-list-item", "depth": 0, "inlineStyleRanges": [], "entityRanges": [], "data": {} }, { "key": "9vgd", "text": "🍺", "type": "atomic", "depth": 0, "inlineStyleRanges": [], "entityRanges": [ { "offset": 0, "length": 1, "key": 0 } ], "data": {} }, { "key": "kst0", "text": "Find the project on Github.", "type": "unstyled", "depth": 0, "inlineStyleRanges": [], "entityRanges": [ { "offset": 20, "length": 6, "key": 1 } ], "data": {} } ] }