forked from extern/egroupware
I guess jQuery adapter doesn't work quite yet, fix get/set_value()
This commit is contained in:
parent
a7654f7952
commit
19991fe899
@ -76,18 +76,28 @@ var et2_htmlarea = et2_inputWidget.extend({
|
|||||||
|
|
||||||
doLoadingFinished: function() {
|
doLoadingFinished: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
this.htmlNode.ckeditor(function() {},this.ck_props);
|
var self = this;
|
||||||
|
this.htmlNode.ckeditor(function() {
|
||||||
|
// If value is set, pass it in here.
|
||||||
|
this.setData(self.value);
|
||||||
|
delete self.value;
|
||||||
|
},this.ck_props);
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy: function() {
|
destroy: function() {
|
||||||
this.htmlNode.ckeditorGet().destroy(true);
|
this.htmlNode.ckeditorGet().destroy(true);
|
||||||
},
|
},
|
||||||
set_value: function(_value) {
|
set_value: function(_value) {
|
||||||
this.htmlNode.val(_value);
|
try {
|
||||||
|
this.htmlNode.ckeditorGet().setData(_value);
|
||||||
|
} catch (e) {
|
||||||
|
// CK editor not ready - callback will do it
|
||||||
|
this.value = _value;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getValue: function() {
|
getValue: function() {
|
||||||
return this.htmlNode.val();
|
return this.htmlNode.ckeditorGet().getData();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user