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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file streamlit_lexical-1.3.1.tar.gz.
File metadata
- Download URL: streamlit_lexical-1.3.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4c6e18e8c0001f5d9036b6740a6be558a4ab696355270ef88cf0c93025f1831
|
|
| MD5 |
078eb961aa4ad1305d5d459e694c487c
|
|
| BLAKE2b-256 |
e17f521abc8c15c7f2b7f8a497fce3e9527cee67d31679f7f5b4bd7963e73750
|
File details
Details for the file streamlit_lexical-1.3.1-py3-none-any.whl.
File metadata
- Download URL: streamlit_lexical-1.3.1-py3-none-any.whl
- Upload date:
- Size: 697.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
528efb14b2783a18e460979f688cda0b3e0376ef8d8a0ed5cee70be47433faca
|
|
| MD5 |
e4831f1f7c996178a93ecab1729d5309
|
|
| BLAKE2b-256 |
7c8980924c92379f5ff533872e89a274f293d247c20d54003f22cf350cdea8e5
|