pvs-hd-tea / MuesliNext

MÜSLI replacement with intutable
Apache License 2.0
0 stars 0 forks source link

research: plugin creation with editor js #62

Closed Janik7777 closed 2 years ago

Janik7777 commented 2 years ago

we use editor js for the generator. new widgets are plugins in editor js.

Janik7777 commented 2 years ago

A plugin is a class that has to contain a render() and a save(blockContent) method.

In the render() function you specify the different elements of the widget and return the element containing them.

The save(blockContent) method gets the current contend of the widget and should return a json containing the data of the element for the editor js page. More can be found at the official docu page at https://editorjs.io/