Wordpress++
This commit is contained in:
1 parent
790f1487a2
commit
3f49ab1747
610 files changed
+58979
-36562
No files matched your search
@@ -85,8 +85,8 @@
|
||||
/**
|
||||
* Utils.js
|
||||
*
|
||||
* Copyright, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
@@ -217,8 +217,8 @@ define("tinymce/pasteplugin/Utils", [
|
||||
/**
|
||||
* Clipboard.js
|
||||
*
|
||||
* Copyright, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
@@ -281,7 +281,7 @@ define("tinymce/pasteplugin/Clipboard", [
|
||||
}
|
||||
|
||||
if (!args.isDefaultPrevented()) {
|
||||
editor.insertContent(html, {merge: editor.settings.paste_merge_formats !== false});
|
||||
editor.insertContent(html, {merge: editor.settings.paste_merge_formats !== false, data: {paste: true}});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -805,19 +805,40 @@ define("tinymce/pasteplugin/Clipboard", [
|
||||
|
||||
// Remove all data images from paste for example from Gecko
|
||||
// except internal images like video elements
|
||||
editor.parser.addNodeFilter('img', function(nodes) {
|
||||
if (!editor.settings.paste_data_images) {
|
||||
editor.parser.addNodeFilter('img', function(nodes, name, args) {
|
||||
function isPasteInsert(args) {
|
||||
return args.data && args.data.paste === true;
|
||||
}
|
||||
|
||||
function remove(node) {
|
||||
if (!node.attr('data-mce-object') && src !== Env.transparentSrc) {
|
||||
node.remove();
|
||||
}
|
||||
}
|
||||
|
||||
function isWebKitFakeUrl(src) {
|
||||
return src.indexOf("webkit-fake-url") === 0;
|
||||
}
|
||||
|
||||
function isDataUri(src) {
|
||||
return src.indexOf("data:") === 0;
|
||||
}
|
||||
|
||||
if (!editor.settings.paste_data_images && isPasteInsert(args)) {
|
||||
var i = nodes.length;
|
||||
|
||||
while (i--) {
|
||||
var src = nodes[i].attributes.map.src;
|
||||
|
||||
// Some browsers automatically produce data uris on paste
|
||||
if (!src) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Safari on Mac produces webkit-fake-url see: https://bugs.webkit.org/show_bug.cgi?id=49141
|
||||
if (src && /^(data:image|webkit\-fake\-url)/.test(src)) {
|
||||
if (!nodes[i].attr('data-mce-object') && src !== Env.transparentSrc) {
|
||||
nodes[i].remove();
|
||||
}
|
||||
if (isWebKitFakeUrl(src)) {
|
||||
remove(nodes[i]);
|
||||
} else if (!editor.settings.allow_html_data_urls && isDataUri(src)) {
|
||||
remove(nodes[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -831,8 +852,8 @@ define("tinymce/pasteplugin/Clipboard", [
|
||||
/**
|
||||
* WordFilter.js
|
||||
*
|
||||
* Copyright, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
@@ -1332,8 +1353,8 @@ define("tinymce/pasteplugin/WordFilter", [
|
||||
/**
|
||||
* Quirks.js
|
||||
*
|
||||
* Copyright, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
@@ -1494,8 +1515,8 @@ define("tinymce/pasteplugin/Quirks", [
|
||||
/**
|
||||
* Plugin.js
|
||||
*
|
||||
* Copyright, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
|
||||
Reference in new issue
Block a user