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.3.tar.gz (686.4 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.3-py3-none-any.whl (695.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: streamlit_lexical-1.3.3.tar.gz
  • Upload date:
  • Size: 686.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for streamlit_lexical-1.3.3.tar.gz
Algorithm Hash digest
SHA256 17a6adf94030cdd42d4c2c1d8425b94acf4b6b103d1aaa42b51e95c71d20722e
MD5 e91f1802b0fe6bc42ba185da6d83416a
BLAKE2b-256 4404ad38d1e5c3343bf7b727e8ee6ac6cdbae7e8513ce28b1f4e7459976346e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for streamlit_lexical-1.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3cb4e6be0cca0ecabb94f5f48190393a7f74350dad55df821713a09a8da82b9b
MD5 8c174a2733da4557f344c6d8be3c6fad
BLAKE2b-256 ca7768d11bd1d74127b5aba5b868d289ac9073179a67880d979bb4a62a3eb156

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