API Reference
This section provides auto-generated documentation from the library’s source code.
Fields
-
class editor_js.fields.EditorJSField(*args, **kwargs)[source]
Bases: JSONField
A JSONField that stores Editor.js data. It deletes the images used in the
Editor.js data when the instance is deleted.
-
contribute_to_class(cls, name, **kwargs)[source]
Connect a post_delete signal to the model class to delete the images
used in the Editor.js data when the instance is deleted.
-
formfield(**kwargs)[source]
Return a form field for the Editor.js data.
-
pre_save(model_instance, add)[source]
Delete the images that are no longer used in the Editor.js data when
the instance is saved.
Renderers
-
class editor_js.renderers.EditorJsRenderer(data, safe=True)[source]
Bases: object
-
clean_inline(text)[source]
Clean text that may carry inline-toolbar markup (bold, italic,
links, …): allowed inline tags pass through, everything else is
dropped. Full escaping here would show the markup as literal text.
-
escape(text)[source]
-
render()[source]
-
render_block(block)[source]
-
render_button(data)[source]
-
render_code(data)[source]
-
render_divider(data)[source]
-
render_embed(data)[source]
-
render_image(data)[source]
-
render_list(data)[source]
-
render_paragraph(data)[source]
-
render_quote(data)[source]
-
render_raw(data)[source]
-
render_table(data)[source]
-
render_unknown(data)[source]