Skip to main content

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.

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 ./

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-0.1.tar.gz (678.9 kB view hashes)

Uploaded Source

Built Distribution

streamlit_lexical-0.1-py3-none-any.whl (687.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page