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

Drupal: Updated tinyMCE to v3.5.12. #3551

Merged
merged 1 commit into from
Apr 2, 2020
Merged
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
1,413 changes: 203 additions & 1,210 deletions drupal/sites/all/libraries/tinymce/changelog.txt

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions drupal/sites/all/libraries/tinymce/examples/css/content.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ td {
font-size: 10px;
}

table, caption, td, th {
font-size: inherit;
font-weight: inherit;
font-style: inherit;
font-variant: inherit;
}

pre {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
Expand Down
28 changes: 25 additions & 3 deletions drupal/sites/all/libraries/tinymce/examples/full.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- TinyMCE -->
<script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
<!-- <script type="text/javascript" src="/powerpaste2/dist/powerpaste/plugin.js"></script> -->
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave,visualblocks",
plugins : "paste,autolink,lists,pagebreak,style,layer,table,save,advhr,advimage," +
"advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace," +
"print,contextmenu,directionality,fullscreen,noneditable,visualchars,nonbreaking," +
"xhtmlxtras,template,wordcount,advlist,visualblocks",

// Theme options
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
Expand All @@ -21,9 +25,21 @@
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
add_unload_trigger: false,

theme_advanced_default_font_size : '10pt',
theme_advanced_default_font_family : 'Verdana',
theme_advanced_fonts : "Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",
theme_advanced_font_sizes : '8pt,9pt,10pt,11pt,12pt,14pt,16pt,18pt,20pt,22pt,24pt,28pt,36pt',
paste_retain_style_properties: 'font-size,font-family,color',
paste_remove_styles_if_webkit: false,

powerpaste_word_import: 'merge',
powerpaste_html_import: 'clean',
powerpaste_allow_local_images: false,

// Example content CSS (should be your site CSS)
content_css : "css/content.css",
// content_css : "css/content.css",

// Drop lists for link/image/media/template dialogs
template_external_list_url : "lists/template_list.js",
Expand Down Expand Up @@ -69,9 +85,15 @@ <h3>Full featured example</h3>
&lt;p&gt;
This is some example text that you can edit inside the &lt;strong&gt;TinyMCE editor&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;p style="font-family: Arial; font-size: 14pt"&gt;
Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
&lt;/p&gt;
<table style="width: 300px">
<tbody>
<tr><td>a</td><td style="font-family: Arial Black; font-size: 28pt">b</td></tr>
<tr><td>c</td><td>d</td></tr>
</tbody>
</table>
</textarea>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
can use it too, but we suggest you first think carefuly about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -395,12 +395,14 @@ var ImageDialog = {
if (v == '0')
img.style.border = isIE ? '0' : '0 none none';
else {
if (b.length == 3 && b[isIE ? 2 : 1])
bStyle = b[isIE ? 2 : 1];
var isOldIE = tinymce.isIE && (!document.documentMode || document.documentMode < 9);

if (b.length == 3 && b[isOldIE ? 2 : 1])
bStyle = b[isOldIE ? 2 : 1];
else if (!bStyle || bStyle == 'none')
bStyle = 'solid';
if (b.length == 3 && b[isIE ? 0 : 2])
bColor = b[isIE ? 0 : 2];
bColor = b[isOldIE ? 0 : 2];
else if (!bColor || bColor == 'none')
bColor = 'black';
img.style.border = v + 'px ' + bStyle + ' ' + bColor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,14 @@ function init() {
if (elm != null && elm.nodeName == "A")
action = "update";

formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true);
formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true);

setPopupControlsDisabled(true);

if (action == "update") {
var href = inst.dom.getAttrib(elm, 'href');
var onclick = inst.dom.getAttrib(elm, 'onclick');
var linkTarget = inst.dom.getAttrib(elm, 'target') ? inst.dom.getAttrib(elm, 'target') : "_self";

// Setup form data
setFormValue('href', href);
Expand Down Expand Up @@ -98,7 +99,7 @@ function init() {
setFormValue('onkeypress', inst.dom.getAttrib(elm, 'onkeypress'));
setFormValue('onkeydown', inst.dom.getAttrib(elm, 'onkeydown'));
setFormValue('onkeyup', inst.dom.getAttrib(elm, 'onkeyup'));
setFormValue('target', inst.dom.getAttrib(elm, 'target'));
setFormValue('target', linkTarget);
setFormValue('classes', inst.dom.getAttrib(elm, 'class'));

// Parse onclick data
Expand All @@ -119,7 +120,7 @@ function init() {
addClassesToList('classlist', 'advlink_styles');

selectByValue(formObj, 'classlist', inst.dom.getAttrib(elm, 'class'), true);
selectByValue(formObj, 'targetlist', inst.dom.getAttrib(elm, 'target'), true);
selectByValue(formObj, 'targetlist', linkTarget, true);
} else
addClassesToList('classlist', 'advlink_styles');
}
Expand Down Expand Up @@ -377,6 +378,9 @@ function getAnchorListHTML(id, target) {
for (i=0, len=nodes.length; i<len; i++) {
if ((name = ed.dom.getAttrib(nodes[i], "name")) != "")
html += '<option value="#' + name + '">' + name + '</option>';

if ((name = nodes[i].id) != "" && !nodes[i].href)
html += '<option value="#' + name + '">' + name + '</option>';
}

if (html == "")
Expand Down

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

Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
init : function(ed, url) {
var t = this;

// Internet Explorer has built-in automatic linking
if (tinyMCE.isIE)
return;

// Add a key down handler
ed.onKeyDown.add(function(ed, e) {
ed.onKeyDown.addToTop(function(ed, e) {
if (e.keyCode == 13)
return t.handleEnter(ed);
});
});

// Internet Explorer has built-in automatic linking for most cases
if (tinyMCE.isIE)
return;

ed.onKeyPress.add(function(ed, e) {
if (e.which == 41)
Expand Down Expand Up @@ -61,7 +61,7 @@

// We need at least five characters to form a URL,
// hence, at minimum, five characters from the beginning of the line.
r = ed.selection.getRng().cloneRange();
r = ed.selection.getRng(true).cloneRange();
if (r.startOffset < 5) {
// During testing, the caret is placed inbetween two text nodes.
// The previous text node contains the URL.
Expand Down Expand Up @@ -89,8 +89,11 @@
while (endContainer.nodeType != 3 && endContainer.firstChild)
endContainer = endContainer.firstChild;

r.setStart(endContainer, 0);
r.setEnd(endContainer, endContainer.nodeValue.length);
// Move range to text node
if (endContainer.nodeType == 3) {
r.setStart(endContainer, 0);
r.setEnd(endContainer, endContainer.nodeValue.length);
}
}

if (r.endOffset == 1)
Expand All @@ -104,8 +107,8 @@
do
{
// Move the selection one character backwards.
r.setStart(endContainer, end - 2);
r.setEnd(endContainer, end - 1);
r.setStart(endContainer, end >= 2 ? end - 2 : 0);
r.setEnd(endContainer, end >= 1 ? end - 1 : 0);
end -= 1;

// Loop until one of the following is found: a blank space, &nbsp;, delimeter, (end-2) >= 0
Expand All @@ -124,13 +127,19 @@
r.setEnd(endContainer, start);
}

// Exclude last . from word like "www.site.com."
var text = r.toString();
if (text.charAt(text.length - 1) == '.') {
r.setEnd(endContainer, start - 1);
}

text = r.toString();
matches = text.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|[A-Z0-9._%+-]+@)(.+)$/i);
matches = text.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+-]+@)(.+)$/i);

if (matches) {
if (matches[1] == 'www.') {
matches[1] = 'http://www.';
} else if (/@$/.test(matches[1])) {
} else if (/@$/.test(matches[1]) && !/^mailto:/.test(matches[1])) {
matches[1] = 'mailto:' + matches[1];
}

Expand All @@ -139,6 +148,7 @@
ed.selection.setRng(r);
tinyMCE.execCommand('createlink',false, matches[1] + matches[2]);
ed.selection.moveToBookmark(bookmark);
ed.nodeChanged();

// TODO: Determine if this is still needed.
if (tinyMCE.isWebKit) {
Expand Down
Loading