Skip to content

Commit f011b78

Browse files
committed
wysihtml5 editor instance now attached to the element.
$('.html_editor')[0].editor
1 parent a6dd8a9 commit f011b78

File tree

1 file changed

+3
-1
lines changed
  • app/assets/javascripts/active_admin/editor

1 file changed

+3
-1
lines changed

app/assets/javascripts/active_admin/editor/editor.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
var Editor = function(el, options) {
88
config = options
99
var _this = this
10-
this.$el = $(el)
10+
this.el = el
11+
this.$el = $(this.el)
1112
this.$textarea = this.$el.find('textarea')
1213
this.policy = this.$el.data('policy')
1314

@@ -72,6 +73,7 @@
7273
stylesheets: config.stylesheets,
7374
parserRules: config.parserRules
7475
})
76+
this.el.editor = this.editor
7577
}
7678

7779
/**

0 commit comments

Comments
 (0)