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 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.3.2.tar.gz (689.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamlit_lexical-1.3.2-py3-none-any.whl (697.8 kB view details)

Uploaded Python 3

File details

Details for the file streamlit_lexical-1.3.2.tar.gz.

File metadata

  • Download URL: streamlit_lexical-1.3.2.tar.gz
  • Upload date:
  • Size: 689.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.10

File hashes

Hashes for streamlit_lexical-1.3.2.tar.gz
Algorithm Hash digest
SHA256 e6ff19d43c1c7740fa58c839b3c5cf853ed8fed0ea0faea46cd0821e40f2c8cc
MD5 db2a30cede546750d8128f241de80697
BLAKE2b-256 6bf9cc2c4d5b931794d8712282e5a281fd3e292000cf4b59804138295d10206c

See more details on using hashes here.

File details

Details for the file streamlit_lexical-1.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_lexical-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d6034bc61774edc36b2ea93ceb71b7bfb838b6860385e5e67e9289bb2a93159a
MD5 78a84a8bda61f1b376216ba1b39d1b87
BLAKE2b-256 93b830cce5bc847575cbeea8495bc72ee9c4560df5d7da943d620f2658c1e939

See more details on using hashes here.

Supported by

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