mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 22:47:03 +03:00
Updated: ckeditor 4.5.3, jquery 1.11.3, openpgpjs 1.2.0
OpenPGP decrypt fix + Small fixes
This commit is contained in:
parent
4deb083d7d
commit
87887373c1
370 changed files with 10805 additions and 5637 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue