Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 4.4.0 how to images to base64 #25

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,44 @@
Version 4.9.11 (2020-07-13)
Fixed the `selection.setContent()` API not running parser filters #TINY-4002
Fixed content in an iframe element parsing as DOM elements instead of text content #TINY-5943
Fixed up and down keyboard navigation not working for inline `contenteditable="false"` elements #TINY-6226
Version 4.9.10 (2020-04-23)
Fixed an issue where the editor selection could end up inside a short ended element (eg br) #TINY-3999
Fixed a security issue related to CDATA sanitization during parsing #TINY-4669
Fixed `media` embed content not processing safely in some cases #TINY-4857
Version 4.9.9 (2020-03-25)
Fixed the table selection not functioning correctly in Microsoft Edge 44 or higher #TINY-3862
Fixed the table resize handles not functioning correctly in Microsoft Edge 44 or higher #TINY-4160
Fixed the `forced_root_block_attrs` setting not applying attributes to new blocks consistently #TINY-4564
Fixed the editor failing to initialize if a script tag was used inside an SVG #TINY-4087
Version 4.9.8 (2020-01-28)
Fixed the `mobile` theme failing to load due to a bundling issue #TINY-4613
Fixed security issue related to parsing HTML comments and CDATA #TINY-4544
Version 4.9.7 (2019-12-19)
Fixed the `visualchars` plugin converting HTML-like text to DOM elements in certain cases #TINY-4507
Fixed an issue with the `paste` plugin not sanitizing content in some cases #TINY-4510
Fixed HTML comments incorrectly being parsed in certain cases #TINY-4511
Version 4.9.6 (2019-09-02)
Fixed image browse button sometimes displaying the browse window twice #TINY-3959
Version 4.9.5 (2019-07-02)
Changed annotations navigation to work the same as inline boundaries #TINY-3396
Fixed the print plugin printing from the wrong window in IE11 #TINY-3762
Fixed an exception being thrown when a file or number input has focus during initialization. Patch contributed by t00 #GH-2194
Fixed positioning of the styleselect menu in iOS while using the mobile theme #TINY-3505
Fixed native context menu not showing with images in IE11 #TINY-3392
Fixed selection incorrectly changing when programmatically setting selection on contenteditable false elements #TINY-3766
Fixed image browse button not working on touch devices #TINY-3751
Fixed so that nbsp entities aren't trimmed in white-space: pre-line elements #TINY-3642
Fixed space key properly inserts a nbsp before/after block elements #TINY-3745
Fixed infinite loop in the paste plugin when IE11 takes a long time to process paste events. Patch contributed by lRawd. #GH-4987
Version 4.9.4 (2019-03-20)
Fixed an issue where **Home/End** keys wouldn't move the caret correctly before or after `contenteditable=false` inline elements #TINY-2995
Fixed an issue where content may have been lost when using permanent bookmarks #TINY-3400
Fixed the mobile editor to clean up properly when removed #TINY-3445
Fixed an issue where retrieving the selected content as text didn't create newlines #TINY-3197
Fixed an issue where typing space between images would cause issues with nbsp not being inserted. #TINY-3346
Version 4.9.3 (2019-01-31)
Added a visualchars_defaul_state setting to the Visualchars Plugin. Patch contributed by mat3e.
Added a visualchars_default_state setting to the Visualchars Plugin. Patch contributed by mat3e.
Fixed a bug where scrolling on a page with more than one editor would cause a ResizeWindow event to fire. #TINY-3247
Fixed a bug where if a plugin threw an error during initialisation the whole editor would fail to load. #TINY-3243
Fixed a bug where getContent would include bogus elements when valid_elements setting was set up in a specific way. #TINY-3213
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tinymce/tinymce",
"version": "4.9.3",
"version": "4.9.11",
"description": "Web based JavaScript HTML WYSIWYG editor control.",
"license": [
"LGPL-2.1-only"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tinymce",
"version": "4.9.3",
"version": "4.9.11",
"repository": {
"type": "git",
"url": "https://github.com/tinymce/tinymce-dist.git"
Expand Down
2 changes: 1 addition & 1 deletion plugins/advlist/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ var advlist = (function () {
if (styles.length > 0) {
addSplitButton(editor, id, tooltip, cmd, nodeName, styles);
} else {
addButton(editor, id, tooltip, cmd, nodeName, styles);
addButton(editor, id, tooltip, cmd, nodeName);
}
};
var register$1 = function (editor) {
Expand Down
14 changes: 7 additions & 7 deletions plugins/autosave/plugin.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(function () {
var autosave = (function () {
var autosave = (function (domGlobals) {
'use strict';

var Cell = function (initial) {
Expand Down Expand Up @@ -51,9 +51,9 @@ var autosave = (function () {
};
var getAutoSavePrefix = function (editor) {
var prefix = editor.getParam('autosave_prefix', 'tinymce-autosave-{path}{query}{hash}-{id}-');
prefix = prefix.replace(/\{path\}/g, document.location.pathname);
prefix = prefix.replace(/\{query\}/g, document.location.search);
prefix = prefix.replace(/\{hash\}/g, document.location.hash);
prefix = prefix.replace(/\{path\}/g, domGlobals.document.location.pathname);
prefix = prefix.replace(/\{query\}/g, domGlobals.document.location.search);
prefix = prefix.replace(/\{hash\}/g, domGlobals.document.location.hash);
prefix = prefix.replace(/\{id\}/g, editor.id);
return prefix;
};
Expand Down Expand Up @@ -165,7 +165,7 @@ var autosave = (function () {
return msg;
};
var setup = function (editor) {
window.onbeforeunload = global$3._beforeUnloadHandler;
domGlobals.window.onbeforeunload = global$3._beforeUnloadHandler;
};

var postRender = function (editor, started) {
Expand Down Expand Up @@ -198,7 +198,7 @@ var autosave = (function () {

global.add('autosave', function (editor) {
var started = Cell(false);
setup(editor);
setup();
register(editor, started);
editor.on('init', function () {
if (shouldRestoreWhenEmpty(editor) && editor.dom.isEmpty(editor.getBody())) {
Expand All @@ -212,5 +212,5 @@ var autosave = (function () {

return Plugin;

}());
}(window));
})();
2 changes: 1 addition & 1 deletion plugins/autosave/plugin.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 25 additions & 25 deletions plugins/codesample/plugin.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(function () {
var codesample = (function () {
var codesample = (function (domGlobals) {
'use strict';

var Cell = function (initial) {
Expand Down Expand Up @@ -43,9 +43,9 @@ var codesample = (function () {
getDialogMinHeight: getDialogMinHeight
};

var window$$1 = {};
var global$2 = window$$1;
var _self = typeof window$$1 !== 'undefined' ? window$$1 : typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope ? self : {};
var window = {};
var global$2 = window;
var _self = typeof window !== 'undefined' ? window : typeof WorkerGlobalScope !== 'undefined' && domGlobals.self instanceof WorkerGlobalScope ? domGlobals.self : {};
var Prism = function () {
var lang = /\blang(?:uage)?-(?!\*)(\w+)\b/i;
var _ = _self.Prism = {
Expand Down Expand Up @@ -136,27 +136,27 @@ var codesample = (function () {
},
plugins: {},
highlightAll: function (async, callback) {
var elements = document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code');
var elements = domGlobals.document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code');
for (var i = 0, element = void 0; element = elements[i++];) {
_.highlightElement(element, async === true, callback);
}
},
highlightElement: function (element, async, callback) {
var language, grammar, parent$$1 = element;
while (parent$$1 && !lang.test(parent$$1.className)) {
parent$$1 = parent$$1.parentNode;
var language, grammar, parent = element;
while (parent && !lang.test(parent.className)) {
parent = parent.parentNode;
}
if (parent$$1) {
language = (parent$$1.className.match(lang) || [
if (parent) {
language = (parent.className.match(lang) || [
,
''
])[1];
grammar = _.languages[language];
}
element.className = element.className.replace(lang, '').replace(/\s+/g, ' ') + ' language-' + language;
parent$$1 = element.parentNode;
if (/pre/i.test(parent$$1.nodeName)) {
parent$$1.className = parent$$1.className.replace(lang, '').replace(/\s+/g, ' ') + ' language-' + language;
parent = element.parentNode;
if (/pre/i.test(parent.nodeName)) {
parent.className = parent.className.replace(lang, '').replace(/\s+/g, ' ') + ' language-' + language;
}
var code = element.textContent;
var env = {
Expand All @@ -171,7 +171,7 @@ var codesample = (function () {
}
_.hooks.run('before-highlight', env);
if (async && _self.Worker) {
var worker = new Worker(_.filename);
var worker = new domGlobals.Worker(_.filename);
worker.onmessage = function (evt) {
env.highlightedCode = evt.data;
_.hooks.run('before-insert', env);
Expand Down Expand Up @@ -264,13 +264,13 @@ var codesample = (function () {
},
hooks: {
all: {},
add: function (name$$1, callback) {
add: function (name, callback) {
var hooks = _.hooks.all;
hooks[name$$1] = hooks[name$$1] || [];
hooks[name$$1].push(callback);
hooks[name] = hooks[name] || [];
hooks[name].push(callback);
},
run: function (name$$1, env) {
var callbacks = _.hooks.all[name$$1];
run: function (name, env) {
var callbacks = _.hooks.all[name];
if (!callbacks || !callbacks.length) {
return;
}
Expand All @@ -285,7 +285,7 @@ var codesample = (function () {
this.content = content;
this.alias = alias;
};
Token.stringify = function (o, language, parent$$1) {
Token.stringify = function (o, language, parent) {
if (typeof o === 'string') {
return o;
}
Expand All @@ -296,15 +296,15 @@ var codesample = (function () {
}
var env = {
type: o.type,
content: Token.stringify(o.content, language, parent$$1),
content: Token.stringify(o.content, language, parent),
tag: 'span',
classes: [
'token',
o.type
],
attributes: {},
language: language,
parent: parent$$1
parent: parent
};
if (env.type === 'comment') {
env.attributes.spellcheck = 'true';
Expand All @@ -315,8 +315,8 @@ var codesample = (function () {
}
_.hooks.run('wrap', env);
var attributes = '';
for (var name$$1 in env.attributes) {
attributes += (attributes ? ' ' : '') + name$$1 + '="' + (env.attributes[name$$1] || '') + '"';
for (var name in env.attributes) {
attributes += (attributes ? ' ' : '') + name + '="' + (env.attributes[name] || '') + '"';
}
return '<' + env.tag + ' class="' + env.classes.join(' ') + '" ' + attributes + '>' + env.content + '</' + env.tag + '>';
};
Expand Down Expand Up @@ -963,5 +963,5 @@ var codesample = (function () {

return Plugin;

}());
}(window));
})();
2 changes: 1 addition & 1 deletion plugins/codesample/plugin.min.js

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions plugins/fullscreen/plugin.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(function () {
var fullscreen = (function () {
var fullscreen = (function (domGlobals) {
'use strict';

var Cell = function (initial) {
Expand Down Expand Up @@ -42,8 +42,8 @@ var fullscreen = (function () {
var getWindowSize = function () {
var w;
var h;
var win = window;
var doc = document;
var win = domGlobals.window;
var doc = domGlobals.document;
var body = doc.body;
if (body.offsetWidth) {
w = body.offsetWidth;
Expand All @@ -66,19 +66,19 @@ var fullscreen = (function () {
};
};
var setScrollPos = function (pos) {
window.scrollTo(pos.x, pos.y);
domGlobals.window.scrollTo(pos.x, pos.y);
};
var toggleFullscreen = function (editor, fullscreenState) {
var body = document.body;
var documentElement = document.documentElement;
var body = domGlobals.document.body;
var documentElement = domGlobals.document.documentElement;
var editorContainerStyle;
var editorContainer, iframe, iframeStyle;
var fullscreenInfo = fullscreenState.get();
var resize = function () {
DOM.setStyle(iframe, 'height', getWindowSize().h - (editorContainer.clientHeight - iframe.clientHeight));
};
var removeResize = function () {
DOM.unbind(window, 'resize', resize);
DOM.unbind(domGlobals.window, 'resize', resize);
};
editorContainer = editor.getContainer();
editorContainerStyle = editorContainer.style;
Expand All @@ -99,7 +99,7 @@ var fullscreen = (function () {
DOM.addClass(body, 'mce-fullscreen');
DOM.addClass(documentElement, 'mce-fullscreen');
DOM.addClass(editorContainer, 'mce-fullscreen');
DOM.bind(window, 'resize', resize);
DOM.bind(domGlobals.window, 'resize', resize);
editor.on('remove', removeResize);
resize();
fullscreenState.set(newFullScreenInfo);
Expand All @@ -117,7 +117,7 @@ var fullscreen = (function () {
DOM.removeClass(documentElement, 'mce-fullscreen');
DOM.removeClass(editorContainer, 'mce-fullscreen');
setScrollPos(fullscreenInfo.scrollPos);
DOM.unbind(window, 'resize', fullscreenInfo.resizeHandler);
DOM.unbind(domGlobals.window, 'resize', fullscreenInfo.resizeHandler);
editor.off('remove', fullscreenInfo.removeHandler);
fullscreenState.set(null);
Events.fireFullscreenStateChanged(editor, false);
Expand Down Expand Up @@ -173,5 +173,5 @@ var fullscreen = (function () {

return Plugin;

}());
}(window));
})();
Loading