https://github.com/musubi-labs/streamlit_lexical
Streamlit component that allows you to use Meta's Lexical rich text editor
https://github.com/musubi-labs/streamlit_lexical
streamlit-component
Last synced: 5 months ago
JSON representation
Streamlit component that allows you to use Meta's Lexical rich text editor
- Host: GitHub
- URL: https://github.com/musubi-labs/streamlit_lexical
- Owner: musubi-labs
- License: mit
- Created: 2024-07-08T23:54:11.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-08-22T15:13:36.000Z (10 months ago)
- Last Synced: 2025-08-22T17:47:54.673Z (10 months ago)
- Topics: streamlit-component
- Language: TypeScript
- Homepage: https://pypi.org/project/streamlit-lexical/
- Size: 362 KB
- Stars: 15
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# streamlit_lexical
Streamlit component that allows you to use Meta's [Lexical](https://lexical.dev/) as a rich text plugin.
## Installation instructions
```sh
pip install streamlit-lexical
```
## Usage instructions
```python
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:
```python
RELEASE = False
```
And you can test out the example.py with your changes by doing the following:
```sh
cd streamlit_lexical/frontend
npm install (or yarn install)
npm run start # Start the Webpack dev server
```
Then, in a separate terminal, run:
```python
pip install -e .
streamlit run example.py
```
Further, to build the package (after making changes/adding features), you can install it locally like:
```sh
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.