Fixed setting lhs/rhs using CodeMirror's setValue.
This commit is contained in:
@@ -599,8 +599,14 @@ jQuery.extend(Mgly.mergely.prototype, {
|
||||
}
|
||||
jQuery('<style type="text/css">' + cmstyle + '</style>').appendTo('head');
|
||||
this.bind();
|
||||
if (this.settings.lhs) this.settings.lhs( this.editor[this.id + '-lhs'].setValue );
|
||||
if (this.settings.rhs) this.settings.rhs( this.editor[this.id + '-rhs'].setValue );
|
||||
if (this.settings.lhs) {
|
||||
var setv = this.editor[this.id + '-lhs'].getDoc().setValue;
|
||||
this.settings.lhs(setv.bind(this.editor[this.id + '-lhs'].getDoc()));
|
||||
}
|
||||
if (this.settings.rhs) {
|
||||
var setv = this.editor[this.id + '-rhs'].getDoc().setValue;
|
||||
this.settings.rhs(setv.bind(this.editor[this.id + '-rhs'].getDoc()));
|
||||
}
|
||||
|
||||
// resize only after bind
|
||||
this.settings.resize();
|
||||
|
||||
Reference in New Issue
Block a user