Streamlit component that allows you to use Meta's Lexical rich text editor
Project description
streamlit_lexical
Streamlit component that allows you to use Meta's Lexical as a rich text plugin.
Installation instructions
pip install streamlit-lexical
Usage instructions
import streamlit as st
from streamlit_lexical import streamlit_lexical
markdown = streamlit_lexical(value="initial value in **markdown**",
placeholder="Enter some rich text",
height=800,
debounce=500,
key='1234',
on_change=None
)
st.markdown(rich_text_dict)
Development instructions
After cloning the github repo...
In init.py, set:
RELEASE = False
And you can test out the example.py with your changes by doing the following:
cd streamlit_lexical/frontend
npm install (or yarn install)
npm run start # Start the Webpack dev server
Then, in a separate terminal, run:
pip install -e .
streamlit run example.py
Further, to build the package (after making changes/adding features), you can install it locally like:
cd streamlit_lexical/frontend
npm install (or yarn install)
npm run build
cd ../..
pip install -e ./
Make sure the init.py file RELEASE is set to True in this case.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
streamlit_lexical-1.0.tar.gz
(683.4 kB
view hashes)
Built Distribution
Close
Hashes for streamlit_lexical-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f6268302ee2a5ac8e11f4b4e7c5f5ec2dfa97aafd200d3f607912067462c9f4 |
|
MD5 | 2aef7ee22560102bc876bd7532902aa7 |
|
BLAKE2b-256 | 54f5edfcb484bd131e2d878ba6f24ae131998267932a957561deaacffa1fb029 |