# 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/4d/30/64b87c3023a12f7bc6fc7545ac9dec05400fe959b3d2948bbeef7231fe66/streamlit_lexical-1.0.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.0",
"project_urls": {
"Homepage": "https://github.com/musubi-labs/streamlit_lexical"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "54f5edfcb484bd131e2d878ba6f24ae131998267932a957561deaacffa1fb029",
"md5": "2aef7ee22560102bc876bd7532902aa7",
"sha256": "6f6268302ee2a5ac8e11f4b4e7c5f5ec2dfa97aafd200d3f607912067462c9f4"
},
"downloads": -1,
"filename": "streamlit_lexical-1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2aef7ee22560102bc876bd7532902aa7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 5242887,
"upload_time": "2024-10-13T19:52:24",
"upload_time_iso_8601": "2024-10-13T19:52:24.817077Z",
"url": "https://files.pythonhosted.org/packages/54/f5/edfcb484bd131e2d878ba6f24ae131998267932a957561deaacffa1fb029/streamlit_lexical-1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4d3064b87c3023a12f7bc6fc7545ac9dec05400fe959b3d2948bbeef7231fe66",
"md5": "00932d76c13a843e7cef54e5293d3f24",
"sha256": "a6d63ff4a1c2ef27791e5e1d3a0493a11fa73bbc371e50c96a031a3b0e33b6a0"
},
"downloads": -1,
"filename": "streamlit_lexical-1.0.tar.gz",
"has_sig": false,
"md5_digest": "00932d76c13a843e7cef54e5293d3f24",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 683417,
"upload_time": "2024-10-13T19:52:27",
"upload_time_iso_8601": "2024-10-13T19:52:27.738179Z",
"url": "https://files.pythonhosted.org/packages/4d/30/64b87c3023a12f7bc6fc7545ac9dec05400fe959b3d2948bbeef7231fe66/streamlit_lexical-1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-13 19:52:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "musubi-labs",
"github_project": "streamlit_lexical",
"github_not_found": true,
"lcname": "streamlit-lexical"
}