mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
Make htmlarea more fault tolerant so it doesn't block the rest of the page if something happens
This commit is contained in:
parent
de49fbda1c
commit
a140cd1f25
@ -77,11 +77,26 @@ var et2_htmlarea = et2_inputWidget.extend({
|
||||
doLoadingFinished: function() {
|
||||
this._super.apply(this, arguments);
|
||||
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);
|
||||
try
|
||||
{
|
||||
this.htmlNode.ckeditor(function() {
|
||||
// If value is set, pass it in here.
|
||||
this.setData(self.value);
|
||||
delete self.value;
|
||||
},this.ck_props);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
if(CKEDITOR.instances[this.id])
|
||||
{
|
||||
CKEDITOR.instances[this.id].destroy();
|
||||
}
|
||||
this.htmlNode.ckeditor(function() {
|
||||
// If value is set, pass it in here.
|
||||
this.setData(self.value);
|
||||
delete self.value;
|
||||
},this.ck_props);
|
||||
}
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
@ -97,7 +112,16 @@ var et2_htmlarea = et2_inputWidget.extend({
|
||||
},
|
||||
|
||||
getValue: function() {
|
||||
return this.htmlNode.ckeditorGet().getData();
|
||||
try
|
||||
{
|
||||
return this.htmlNode.ckeditorGet().getData();
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
// CK Error
|
||||
this.egw().debug("error",e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user