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.0.tar.gz (689.9 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.0-py3-none-any.whl (698.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for streamlit_lexical-1.3.0.tar.gz
Algorithm Hash digest
SHA256 a496f849772c768c786b09420306d8b2290a5a2fda308b5441fb69be778b0196
MD5 c89cb03d14ba699faf69d8b84c357cdd
BLAKE2b-256 6ff5ec170a04e2d562935360a89b8c2fe94447ca908d4b089c59f97ac0d9e156

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for streamlit_lexical-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ede2392dfbd529866db9f8dca4b9be0a2b6a1e8050d7957ddba52b74ce820f54
MD5 3ef632d08defb2536fb1d3f04ecf16f2
BLAKE2b-256 ff5db5612804b0ab683acbe38ef7db5e764471dbafa21be635a3e22041dc4d0f

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