feat: API: expose quill editor query functions

Этот коммит содержится в:
Mattia Roccoberton
2025-03-17 18:07:27 +01:00
родитель 328ee0d9fa
Коммит af901f4f7d
4 изменённых файлов: 91 добавлений и 1 удалений

Просмотреть файл

@@ -105,6 +105,14 @@ Consider that this is just a basic example: images are uploaded as soon as they
the *upload_admin_post_path*) and it doesn't provide a way to remove images (just deleting them from
the editor will not destroy them, you'll need to implement a purge logic for that).
## Javascript API
Some methods are provided for advanced use cases:
- `window.getQuillEditors()`: returns all the available Quill editors instances;
- `window.getQuillEditorByIndex(n)`: returns the N-th Quill editor instance;
- `window.getQuillEditorByElementId(id)`: returns the Quill editor instance related to the specified element id (e.g. _article_description_).
## Development
Project created by [Mattia Roccoberton](http://blocknot.es), thanks also to the good guys that opened issues and pull requests from time to time.