REFACTOR: this.$() deprecation (#7928)

REFACTOR: this.$() deprecation (#7928)

diff --git a/app/assets/javascripts/discourse/components/composer-editor.js.es6 b/app/assets/javascripts/discourse/components/composer-editor.js.es6
index 92fd619..56a82f7 100644
--- a/app/assets/javascripts/discourse/components/composer-editor.js.es6
+++ b/app/assets/javascripts/discourse/components/composer-editor.js.es6
@@ -868,7 +868,8 @@ export default Ember.Component.extend({
     // wraps previewed upload markdown in a codeblock in its own class to keep a track
     // of indexes later on to replace the correct upload placeholder in the composer
     if ($preview.find(".codeblock-image").length === 0) {
-      this.$(".d-editor-preview *")
+      $(this.element)
+        .find(".d-editor-preview *")
         .contents()
         .each(function() {
           if (this.nodeType !== 3) return; // TEXT_NODE

GitHub sha: e444ce7c