# How to override a method in post-cooked.js.es6 in a plugin?

**URL:** <https://meta.discourse.org/t/how-to-override-a-method-in-post-cooked-js-es6-in-a-plugin/120613>\
**Category:** Development\
**Created:** [17 juni 2019 om 21:15 UTC](https://meta.discourse.org/t/how-to-override-a-method-in-post-cooked-js-es6-in-a-plugin/120613 "2019-06-17T21:15:37Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![sachinsiby](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@sachinsiby](https://meta.discourse.org/u/sachinsiby)\
**Post date:** [17 juni 2019 om 21:15 UTC](https://meta.discourse.org/t/how-to-override-a-method-in-post-cooked-js-es6-in-a-plugin/120613/1 "2019-06-17T21:15:37Z")

</div>

Hi,

I’d like to customize the reply/embedded-post. This requires a modification to the `_computeCooked` method in [post-cooked](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/widgets/post-cooked.js.es6) via a plugin; essentially when this.attrs.embeddedPost is true, render something else.

I noticed it’s easier to override or reopen ‘conventional’ Ember classes or the widgets created using ‘createWidget’. What would be the best way to achieve this for the PostCooked class?

---

_[View the full topic](https://meta.discourse.org/t/how-to-override-a-method-in-post-cooked-js-es6-in-a-plugin/120613)._
