# Как добавить поддержку текстового редактора с форматированием к моему расширению Markdown?

**URL:** https://meta.discourse.org/t/how-do-i-add-rich-text-editor-support-to-my-markdown-extension/387753
**Category:** Development
**Created:** [06.Ноябрь.2025 07:32:30 UTC](https://meta.discourse.org/t/how-do-i-add-rich-text-editor-support-to-my-markdown-extension/387753 "2025-11-06T07:32:30Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![renato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/renato/32/383632_2.png) [@renato](https://meta.discourse.org/u/renato)
#### Post date: [09.Ноябрь.2025 12:46:31 UTC](https://meta.discourse.org/t/how-do-i-add-rich-text-editor-support-to-my-markdown-extension/387753/3 "2025-11-09T12:46:31Z")

</div>

> [@ego-lay\_atman-bay](#):
>
> Проблема заключалась в том, что тип токена `html_raw` игнорируется конвертером визуального редактора.

Не совсем так, но у нас уже есть расширение [`html-block`](https://github.com/discourse/discourse/blob/main/frontend/discourse/app/static/prosemirror/extensions/html-block.js), обрабатывающее токены `html_raw` из markdown-it. Это универсальный способ обработки _прозрачного_ контента.

Вы можете ознакомиться со всеми [типами](https://github.com/discourse/discourse/blob/54723610355e58514646d6162e8a2511b160738b/frontend/discourse/app/lib/composer/rich-editor-extensions.js#L74-L99) расширений, разрешённых через `registerRichEditorExtension`. Также есть множество [расширений от плагинов](https://github.com/search?q=repo%3Adiscourse%2Fdiscourse%20registerRichEditorExtension&type=code), а также тех, что [зарегистрированы по умолчанию](https://github.com/discourse/discourse/blob/main/frontend/discourse/app/static/prosemirror/extensions/register-default.js), которые можно использовать как пример.

Пожалуйста, дайте знать, если у вас возникнут вопросы.

---

_[View the full topic](https://meta.discourse.org/t/how-do-i-add-rich-text-editor-support-to-my-markdown-extension/387753)._
