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.2.0.tar.gz (218.8 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.2.0-py3-none-any.whl (219.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for streamlit_lexical-1.2.0.tar.gz
Algorithm Hash digest
SHA256 5b7b59f06bc44cb98fb6a9fe9314b150d354409cb368e0f5f823e63655b20669
MD5 8fe62e096d55f955ead7dd07765e4240
BLAKE2b-256 a87d0385ef94c10909efedb2a9faa4de233e1c8156386f3c5ba4d83ed36539e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for streamlit_lexical-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e56ea4c13b89ac6df1bb161593214766dd6a78682a70147befd689ee1aae203
MD5 4ff156c94b170a0db11e97286bd96dd1
BLAKE2b-256 0fd69dd5992bcf21a9d035177cf8374690974d5fb1bcdd3dcfe1ec75920aa802

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