# decorateCooked в теме против HighlightJS

**URL:** <https://meta.discourse.org/t/decoratecooked-in-theme-vs-highlighjs/126208>\
**Category:** Product Support\
**Created:** [19.Август.2019 18:21:14 UTC](https://meta.discourse.org/t/decoratecooked-in-theme-vs-highlighjs/126208 "2019-08-19T18:21:14Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [27.Сентябрь.2022 16:26:11 UTC](https://meta.discourse.org/t/decoratecooked-in-theme-vs-highlighjs/126208/3 "2022-09-27T16:26:11Z")

</div>

> [@Mark Alldritt](#):
>
> Есть ли способ заставить мой код `decorateCooked` выполняться **после** того, как HighlightJS завершит свою работу?

У меня возникла точно такая же проблема, поэтому я добавил новую функцию API для решения этого случая: `api.registerHighlightJSPlugin`.

Вы можете передавать ей плагины, основанные на функциях HighlightJS. Документация доступна по адресу [Plugin API — highlight.js 11.9.0 documentation](https://highlightjs.readthedocs.io/en/latest/plugin-api.html#function-based-plugins)

---

_[View the full topic](https://meta.discourse.org/t/decoratecooked-in-theme-vs-highlighjs/126208)._
