# 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.
Raw data
{
"_id": null,
"home_page": "https://github.com/musubi-labs/streamlit_lexical",
"name": "streamlit-lexical",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": null,
"author": "Ben F",
"author_email": "ben@musubilabs.ai",
"download_url": "https://files.pythonhosted.org/packages/14/48/3d4d40b0ecd5cfddc7105da297bb0857b38b841785b9f91571874d24512c/streamlit_lexical-1.1.tar.gz",
"platform": null,
"description": "# streamlit_lexical\n\nStreamlit component that allows you to use Meta's [Lexical](https://lexical.dev/) as a rich text plugin. \n\n## Installation instructions\n\n```sh\npip install streamlit-lexical\n```\n\n## Usage instructions\n\n```python\nimport streamlit as st\n\nfrom streamlit_lexical import streamlit_lexical\n\nmarkdown = streamlit_lexical(value=\"initial value in **markdown**\",\n placeholder=\"Enter some rich text\", \n height=800,\n debounce=500,\n key='1234', \n on_change=None\n )\n\n\nst.markdown(rich_text_dict)\n```\n\n## Development instructions\n\nAfter cloning the github repo...\n\nIn __init__.py, set:\n```python\nRELEASE = False\n```\nAnd you can test out the example.py with your changes by doing the following:\n\n```sh\ncd streamlit_lexical/frontend\nnpm install (or yarn install)\nnpm run start # Start the Webpack dev server\n```\n\nThen, in a separate terminal, run:\n```python\npip install -e .\nstreamlit run example.py\n```\n\nFurther, to build the package (after making changes/adding features), you can install it locally like: \n```sh\ncd streamlit_lexical/frontend\nnpm install (or yarn install)\nnpm run build\ncd ../..\npip install -e ./\n```\n\nMake sure the __init__.py file RELEASE is set to True in this case. \n",
"bugtrack_url": null,
"license": null,
"summary": "Streamlit component that allows you to use Meta's Lexical rich text editor",
"version": "1.1",
"project_urls": {
"Homepage": "https://github.com/musubi-labs/streamlit_lexical"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "618b096e66762a2fdac4654f542a735cae9af6ba937f1de8e9d02c41d6f1e149",
"md5": "32917c72597730266059332d0253711a",
"sha256": "2007940c686556b3c2655f13c2415544cccf99f7ed1a24195da80dff7bed6efa"
},
"downloads": -1,
"filename": "streamlit_lexical-1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "32917c72597730266059332d0253711a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 5894735,
"upload_time": "2024-10-30T16:09:39",
"upload_time_iso_8601": "2024-10-30T16:09:39.135679Z",
"url": "https://files.pythonhosted.org/packages/61/8b/096e66762a2fdac4654f542a735cae9af6ba937f1de8e9d02c41d6f1e149/streamlit_lexical-1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "14483d4d40b0ecd5cfddc7105da297bb0857b38b841785b9f91571874d24512c",
"md5": "f6514c3a8b20801aaf086d058eb2a414",
"sha256": "d2b80f3ca9b1a75e241d83e813cb2b13fef41896dd89ddfeea47e5c36beb17e8"
},
"downloads": -1,
"filename": "streamlit_lexical-1.1.tar.gz",
"has_sig": false,
"md5_digest": "f6514c3a8b20801aaf086d058eb2a414",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 683433,
"upload_time": "2024-10-30T16:09:43",
"upload_time_iso_8601": "2024-10-30T16:09:43.084362Z",
"url": "https://files.pythonhosted.org/packages/14/48/3d4d40b0ecd5cfddc7105da297bb0857b38b841785b9f91571874d24512c/streamlit_lexical-1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-30 16:09:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "musubi-labs",
"github_project": "streamlit_lexical",
"github_not_found": true,
"lcname": "streamlit-lexical"
}