New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@plone/blocks-conversion-tool

Package Overview
Dependencies
Maintainers
7
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@plone/blocks-conversion-tool

[![NPM](https://img.shields.io/npm/v/@plone/blocks-conversion-tool.svg)](https://www.npmjs.com/package/@plone/blocks-conversion-tool) [![Code analysis checks](https://github.com/plone/blocks-conversion-tool/actions/workflows/code.yml/badge.svg)](https://g

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
33
increased by371.43%
Maintainers
7
Weekly downloads
 
Created
Source

Blocks Conversion Tool

NPM Code analysis checks Unit tests

Introduction

This package implements a server with a simple API to convert HTML (as used in Plone Classic) to Blocks (as used on Volto).

Starting the server

From source

git clone https://github.com/plone/blocks-conversion-tool.git
cd blocks-conversion-tool
yarn install
yarn start

With Docker

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"}'

Keywords

FAQs

Package last updated on 20 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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