Custom component for editorjs.
Editorjs is json-based rich-text-editor.
pip install streamlit-editorjs-componentimport streamlit as st
from streamlit-editorjs-component import streamlit_editorjs
content = streamlit_editorjs(height=500)
st.write(content)Args:
data (dict, optional): initial json data formatted as EditorJS. Defaults to None.
key (str, optional): Streamlit state key. Defaults to None.
height (int, optional): Component block height it the content over the height, it makes scroll. Defaults to 500.
Returns:
dict: dictionary content from EditorJS.
Add tools to constant.js
yarn install
yarn buildstreamlit run test/st_component_example.py