Name | st-tiny-editor JSON |
Version |
1.0.2
JSON |
| download |
home_page | |
Summary | Streamlit component that allows you to render a TinyMCE editor in your app. |
upload_time | 2024-02-20 13:17:21 |
maintainer | |
docs_url | None |
author | Sergio Demis Lopez Martinez |
requires_python | >=3.7 |
license | |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# st-tiny-editor
st-tiny-editor is a versatile Streamlit component designed to enhance your application's text editing capabilities. With st-tiny-editor, you can effortlessly integrate the robust TinyMCE editor into your Streamlit applications, providing users with a seamless and intuitive editing experience.
TinyMCE is a feature-rich WYSIWYG editor that offers a plethora of customization options, making it ideal for various text editing tasks. Whether you're building a blog, a content management system, or simply need a more interactive text input for your Streamlit app, st-tiny-editor has you covered.
With st-tiny-editor, you can:
- **Enable Rich Text Editing**: Allow users to format text with a variety of styles, fonts, colors, and more.
- **Insert Images and Media**: Easily insert images and media files into the editor to enrich content.
- **Customize Toolbar and Plugins**: Tailor the editor's toolbar and enable/disable plugins to suit your application's specific needs.
- **Control Editor Height and Styling**: Adjust the editor's height and apply custom CSS styles to seamlessly integrate with your app's design.
Enhance your Streamlit applications with st-tiny-editor and empower your users with an intuitive and feature-rich text editing experience.
## Installation
You can install `st-tiny-editor` via pip:
```bash
pip install st-tiny-editor
```
## Usage
The `tiny_editor` function initializes a text editor with specified parameters and default values if not provided.
### Parameters
- **apiKey** (str, optional): Specifies an API key for authentication. If no `apiKey` is provided, certain features of the editor will be disabled.
- **initialValue** (str, optional): Specifies the initial content to be displayed in the editor. Defaults to an empty string if not provided.
- **key** (str, optional): Specifies a unique identifier for the editor instance. Useful when working with multiple editor instances on the same page.
- **height** (int, optional): Specifies the height of the editor in pixels. Defaults to 200 if not provided.
- **menubar** (bool, optional): Specifies whether the editor should display a menu bar. Defaults to False.
- **plugins** (list of str, optional): Specifies a list of plugins that should be enabled in the editor. Defaults to a standard set of plugins.
- **toolbar** (str, optional): Specifies the toolbar configuration for the editor. Defaults to a standard toolbar configuration.
- **content_style** (str, optional): Specifies the CSS styles that should be applied to the editor content. Defaults to a standard style.
- **disabled** (bool, optional): Specifies whether the editor should be disabled. Defaults to False.
For more information on available options, refer to the [TinyMCE documentation](https://www.tiny.cloud/docs/tinymce/latest/react-ref/).
### Example
Here's an example demonstrating the usage of the `tiny_editor` function:
```python
from st_tiny_editor import tiny_editor
import streamlit as st
# Initialize the TinyMCE editor
editor_content = tiny_editor(
apiKey=st.secrets["TINY_API_KEY"],
height=1000,
initialValue="<p>Hello World</p>",
toolbar='undo redo | blocks fontfamily fontsize | bold italic underline strikethrough | link image media table | align lineheight | numlist bullist indent outdent | emoticons charmap | removeformat'
)
# Display the content entered in the editor
st.write(editor_content, unsafe_allow_html=True)
```
In this example, we initialize the TinyMCE editor with a specified API key, height, initial content, and custom toolbar configuration. The content entered by the user in the editor is then displayed using Streamlit's `write` function.
## Development
To contribute to `st-tiny-editor`, follow these steps:
1. Clone this repository: `git clone https://github.com/your_username/st-tiny-editor`
2. Navigate to the repository: `cd st-tiny-editor`
3. Install the required dependencies: `pip install -r requirements.txt`
4. Navigate to the `streamlit_tiny_editor` directory: `cd streamlit_tiny_editor`
5. Install Yarn if you haven't already: [Yarn Installation Guide](https://classic.yarnpkg.com/en/docs/install/)
6. Install the frontend dependencies by running `yarn install` in the `frontend` directory.
7. Make changes and test them.
8. Submit a pull request!
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Acknowledgements
- [Streamlit](https://streamlit.io) - For providing an amazing platform for building data apps.
- [TinyMCE](https://www.tiny.cloud/) - For the rich text editing capabilities.
---
Feel free to customize this README to better fit your package's features and requirements.
Raw data
{
"_id": null,
"home_page": "",
"name": "st-tiny-editor",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "",
"author": "Sergio Demis Lopez Martinez",
"author_email": "sergioska81@hotmail.com",
"download_url": "https://files.pythonhosted.org/packages/23/64/ff992b465e4aff4f8eb3d67fcca6ea5a25d88874d0add8c4815f624d3c2d/st-tiny-editor-1.0.2.tar.gz",
"platform": null,
"description": "\n# st-tiny-editor\n\nst-tiny-editor is a versatile Streamlit component designed to enhance your application's text editing capabilities. With st-tiny-editor, you can effortlessly integrate the robust TinyMCE editor into your Streamlit applications, providing users with a seamless and intuitive editing experience.\n\nTinyMCE is a feature-rich WYSIWYG editor that offers a plethora of customization options, making it ideal for various text editing tasks. Whether you're building a blog, a content management system, or simply need a more interactive text input for your Streamlit app, st-tiny-editor has you covered.\n\nWith st-tiny-editor, you can:\n\n- **Enable Rich Text Editing**: Allow users to format text with a variety of styles, fonts, colors, and more.\n- **Insert Images and Media**: Easily insert images and media files into the editor to enrich content.\n- **Customize Toolbar and Plugins**: Tailor the editor's toolbar and enable/disable plugins to suit your application's specific needs.\n- **Control Editor Height and Styling**: Adjust the editor's height and apply custom CSS styles to seamlessly integrate with your app's design.\n\nEnhance your Streamlit applications with st-tiny-editor and empower your users with an intuitive and feature-rich text editing experience.\n\n## Installation\n\nYou can install `st-tiny-editor` via pip:\n\n```bash\npip install st-tiny-editor\n```\n\n## Usage\n\nThe `tiny_editor` function initializes a text editor with specified parameters and default values if not provided.\n\n### Parameters\n\n- **apiKey** (str, optional): Specifies an API key for authentication. If no `apiKey` is provided, certain features of the editor will be disabled.\n- **initialValue** (str, optional): Specifies the initial content to be displayed in the editor. Defaults to an empty string if not provided.\n- **key** (str, optional): Specifies a unique identifier for the editor instance. Useful when working with multiple editor instances on the same page.\n- **height** (int, optional): Specifies the height of the editor in pixels. Defaults to 200 if not provided.\n- **menubar** (bool, optional): Specifies whether the editor should display a menu bar. Defaults to False.\n- **plugins** (list of str, optional): Specifies a list of plugins that should be enabled in the editor. Defaults to a standard set of plugins.\n- **toolbar** (str, optional): Specifies the toolbar configuration for the editor. Defaults to a standard toolbar configuration.\n- **content_style** (str, optional): Specifies the CSS styles that should be applied to the editor content. Defaults to a standard style.\n- **disabled** (bool, optional): Specifies whether the editor should be disabled. Defaults to False.\n\nFor more information on available options, refer to the [TinyMCE documentation](https://www.tiny.cloud/docs/tinymce/latest/react-ref/).\n\n### Example\n\nHere's an example demonstrating the usage of the `tiny_editor` function:\n\n```python\nfrom st_tiny_editor import tiny_editor\nimport streamlit as st\n\n# Initialize the TinyMCE editor\neditor_content = tiny_editor(\n apiKey=st.secrets[\"TINY_API_KEY\"],\n height=1000,\n initialValue=\"<p>Hello World</p>\",\n toolbar='undo redo | blocks fontfamily fontsize | bold italic underline strikethrough | link image media table | align lineheight | numlist bullist indent outdent | emoticons charmap | removeformat'\n)\n\n# Display the content entered in the editor\nst.write(editor_content, unsafe_allow_html=True)\n```\n\nIn this example, we initialize the TinyMCE editor with a specified API key, height, initial content, and custom toolbar configuration. The content entered by the user in the editor is then displayed using Streamlit's `write` function.\n\n## Development\n\nTo contribute to `st-tiny-editor`, follow these steps:\n\n1. Clone this repository: `git clone https://github.com/your_username/st-tiny-editor`\n2. Navigate to the repository: `cd st-tiny-editor`\n3. Install the required dependencies: `pip install -r requirements.txt`\n4. Navigate to the `streamlit_tiny_editor` directory: `cd streamlit_tiny_editor`\n5. Install Yarn if you haven't already: [Yarn Installation Guide](https://classic.yarnpkg.com/en/docs/install/)\n6. Install the frontend dependencies by running `yarn install` in the `frontend` directory.\n7. Make changes and test them.\n8. Submit a pull request!\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgements\n\n- [Streamlit](https://streamlit.io) - For providing an amazing platform for building data apps.\n- [TinyMCE](https://www.tiny.cloud/) - For the rich text editing capabilities.\n\n---\n\nFeel free to customize this README to better fit your package's features and requirements.\n",
"bugtrack_url": null,
"license": "",
"summary": "Streamlit component that allows you to render a TinyMCE editor in your app.",
"version": "1.0.2",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e4b7f3f8a389924d9cd06f17b0d1e1e9fe745a8a80a680aea9942b2ccec135cd",
"md5": "f55b2d1b804733812f803f3ef0426a52",
"sha256": "6c1a8ee6e0d2435bdc8c367e9cc87f24f6b227f35a38c3f8fc2cad09b7d79180"
},
"downloads": -1,
"filename": "st_tiny_editor-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f55b2d1b804733812f803f3ef0426a52",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 6639,
"upload_time": "2024-02-20T13:17:18",
"upload_time_iso_8601": "2024-02-20T13:17:18.127177Z",
"url": "https://files.pythonhosted.org/packages/e4/b7/f3f8a389924d9cd06f17b0d1e1e9fe745a8a80a680aea9942b2ccec135cd/st_tiny_editor-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2364ff992b465e4aff4f8eb3d67fcca6ea5a25d88874d0add8c4815f624d3c2d",
"md5": "9e2b8f461272a793199046066ddecb42",
"sha256": "4d52c55a63fcb3477c71bbfd08cc45744043b83f56ba1c1c6df7b69ff329a2d3"
},
"downloads": -1,
"filename": "st-tiny-editor-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "9e2b8f461272a793199046066ddecb42",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 5928,
"upload_time": "2024-02-20T13:17:21",
"upload_time_iso_8601": "2024-02-20T13:17:21.967635Z",
"url": "https://files.pythonhosted.org/packages/23/64/ff992b465e4aff4f8eb3d67fcca6ea5a25d88874d0add8c4815f624d3c2d/st-tiny-editor-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-20 13:17:21",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "st-tiny-editor"
}