Updated: ckeditor 4.5.3, jquery 1.11.3, openpgpjs 1.2.0

OpenPGP decrypt fix
+ Small fixes
This commit is contained in:
RainLoop Team 2015-09-17 22:48:52 +03:00
parent 4deb083d7d
commit 87887373c1
370 changed files with 10805 additions and 5637 deletions

View file

@ -209,6 +209,17 @@
}
};
HtmlEditor.prototype.replaceHtml = function (mFind, sReplaceHtml)
{
if (this.editor && this.__inited && 'wysiwyg' === this.editor.mode)
{
try {
this.editor.setData(
this.editor.getData().replace(mFind, sReplaceHtml));
} catch (e) {}
}
};
HtmlEditor.prototype.setPlain = function (sPlain, bFocus)
{
if (this.editor && this.__inited)
@ -298,6 +309,36 @@
self.focusTrigger();
});
if (window.FileReader)
{
self.editor.on('drop', function(evt) {
if (0 < evt.data.dataTransfer.getFilesCount())
{
var file = evt.data.dataTransfer.getFile(0);
if (file && window.FileReader && evt.data.dataTransfer.id &&
file.type && file.type.match(/^image/i))
{
var
id = evt.data.dataTransfer.id,
imageId = '[img=' + id +']',
reader = new window.FileReader()
;
reader.onloadend = function () {
if (reader.result)
{
self.replaceHtml(imageId, '<img src="' + reader.result + '" />');
}
};
reader.readAsDataURL(file);
evt.data.dataTransfer.setData('text/html', imageId);
}
}
});
}
self.editor.on('instanceReady', function () {
if (self.editor.removeMenuItem)