Sign inSign up

plone/blocks-conversion-tool

By plone

•Updated over 2 years ago

Image
Integration & delivery
Content management system
0

10K+

plone/blocks-conversion-tool repository overview

⁠Blocks Conversion Tool

⁠Introduction

Server with a simple API to convert HTML (as used in Plone Classic) to Blocks (as used on Volto).

⁠Starting the server

docker run -it -p 5000:5000 plone/blocks-conversion-tool:latest

⁠Usage

⁠HTML to Blocks (Slate)

Slate⁠ is going to be the default text block for Plone 6, to convert HTML to an array of blocks call the service passing the HTML as shown below:

curl -i -X POST http://localhost:5000/html -H "Accept: application/json" -H "Content-Type: application/json" --data-raw '{"html": "<p>Hello world!</p>"}'

⁠HTML to Blocks (DraftJS)

Draft-JS is the legacy default text block used in Volto.

curl -i -X POST http://localhost:5000/html -H "Accept: application/json" -H "Content-Type: application/json" --data-raw '{"html": "<p>Hello world!</p>", "converter": "draftjs"}'

Tag summary

Content type

Image

Digest

sha256:e57952418…

Size

67.4 MB

Last updated

over 2 years ago

docker pull plone/blocks-conversion-tool