2ik / django-editorjs-fields

Django plugin for using Editor.js
MIT License
133 stars 33 forks source link

Invalid config in EDITORJS_DEFAULT_CONFIG_TOOLS #39

Closed aq1 closed 2 years ago

aq1 commented 2 years ago

I am not 100% sure but it seems that you need to keep keys in this dict EDITORJS_DEFAULT_CONFIG_TOOLS lowercase. For example: 'list': {'class': 'List', 'inlineToolbar': True},

If you keep them capitalized the data generated by the widget won't be valid outside admin widget, because EditorJs expects lowercased types of blocks. You can check it in plugins documentation or on main page of editor. For example 👇

image
2ik commented 2 years ago

if we do this, then after updating the plugin, app may have problems. developers can use their own logic for displaying fields on front. EDITORJS_DEFAULT_CONFIG_TOOLS parameter can always be customized in your settings