summaryrefslogtreecommitdiff
path: root/public/javascripts/tiny_mce/plugins/paste/js
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-06-27 16:58:53 +0200
committererdgeist <erdgeist@erdgeist.org>2026-06-27 16:58:53 +0200
commit420506e58fdfc84f1a5bede0a01dedf0af3bb4f3 (patch)
tree57726b40e8aa9ccf80f874f39d3facefc0331420 /public/javascripts/tiny_mce/plugins/paste/js
parent241d5e91b2b6716e2861cc77d319c3d3568343a8 (diff)
Stage 7: Rails 7.2 → 8.1 on Ruby 3.2.11
- Bump Rails to 8.1.3 (Ruby unchanged at 3.2.11, new gemset rails8-upgrade) - config.load_defaults 8.1; merge app:update diffs for all environment files - Remove routing-filter 0.7.0; replace with native scope '(:locale)' in routes.rb and default_url_options in ApplicationController - Delete config/initializers/routing_filter_rails71_patch.rb - Replace vendored TinyMCE 3.x (~200 files) with tinymce-rails ~> 8.3; migrate admin_interface.js from jQuery .tinymce()/advanced theme to tinymce.init(); add config/tinymce.yml; note: TinyMCE 7+ is GPL - rails-i18n ~> 8.0 added explicitly (previously indirect dependency) - awesome_nested_set, acts-as-taggable-on pinned to git main/master (gemspec activerecord < 8.1 ceiling; no functional incompatibility; repin to version once upstream releases updated gemspecs) - globalize ~> 7.0, libxml-ruby ~> 5.0, nokogiri ~> 1.18, pg ~> 1.5 - sass-rails, coffee-rails, uglifier moved from :assets group to main (Sprockets 4 convention; :assets group no longer meaningful) - Node: head, draft, lock_owner marked belongs_to optional: true - Page: node, user, editor marked belongs_to optional: true - Static assets in public/images/ and public/javascripts/ referenced via plain HTML tags; Rails 8 load_defaults raises on pipeline helpers for undeclared assets - sessions_controller_test.rb: remove stale require and dead rescue_action - users_controller_test.rb: assert button[type=submit] not input[type=submit] (Rails 8 button_to renders <button> not <input>) - test_helper.rb: node.reload after children.create! (awesome_nested_set 3.9.0 does not refresh parent in memory after callback) - 129 runs, 339 assertions, 3 failures, 0 errors — identical baseline to 7.2
Diffstat (limited to 'public/javascripts/tiny_mce/plugins/paste/js')
-rw-r--r--public/javascripts/tiny_mce/plugins/paste/js/pastetext.js36
-rw-r--r--public/javascripts/tiny_mce/plugins/paste/js/pasteword.js51
2 files changed, 0 insertions, 87 deletions
diff --git a/public/javascripts/tiny_mce/plugins/paste/js/pastetext.js b/public/javascripts/tiny_mce/plugins/paste/js/pastetext.js
deleted file mode 100644
index c524f9e..0000000
--- a/public/javascripts/tiny_mce/plugins/paste/js/pastetext.js
+++ /dev/null
@@ -1,36 +0,0 @@
1tinyMCEPopup.requireLangPack();
2
3var PasteTextDialog = {
4 init : function() {
5 this.resize();
6 },
7
8 insert : function() {
9 var h = tinyMCEPopup.dom.encode(document.getElementById('content').value), lines;
10
11 // Convert linebreaks into paragraphs
12 if (document.getElementById('linebreaks').checked) {
13 lines = h.split(/\r?\n/);
14 if (lines.length > 1) {
15 h = '';
16 tinymce.each(lines, function(row) {
17 h += '<p>' + row + '</p>';
18 });
19 }
20 }
21
22 tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h});
23 tinyMCEPopup.close();
24 },
25
26 resize : function() {
27 var vp = tinyMCEPopup.dom.getViewPort(window), el;
28
29 el = document.getElementById('content');
30
31 el.style.width = (vp.w - 20) + 'px';
32 el.style.height = (vp.h - 90) + 'px';
33 }
34};
35
36tinyMCEPopup.onInit.add(PasteTextDialog.init, PasteTextDialog);
diff --git a/public/javascripts/tiny_mce/plugins/paste/js/pasteword.js b/public/javascripts/tiny_mce/plugins/paste/js/pasteword.js
deleted file mode 100644
index a52731c..0000000
--- a/public/javascripts/tiny_mce/plugins/paste/js/pasteword.js
+++ /dev/null
@@ -1,51 +0,0 @@
1tinyMCEPopup.requireLangPack();
2
3var PasteWordDialog = {
4 init : function() {
5 var ed = tinyMCEPopup.editor, el = document.getElementById('iframecontainer'), ifr, doc, css, cssHTML = '';
6
7 // Create iframe
8 el.innerHTML = '<iframe id="iframe" src="javascript:\'\';" frameBorder="0" style="border: 1px solid gray"></iframe>';
9 ifr = document.getElementById('iframe');
10 doc = ifr.contentWindow.document;
11
12 // Force absolute CSS urls
13 css = [ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css")];
14 css = css.concat(tinymce.explode(ed.settings.content_css) || []);
15 tinymce.each(css, function(u) {
16 cssHTML += '<link href="' + ed.documentBaseURI.toAbsolute('' + u) + '" rel="stylesheet" type="text/css" />';
17 });
18
19 // Write content into iframe
20 doc.open();
21 doc.write('<html><head>' + cssHTML + '</head><body class="mceContentBody" spellcheck="false"></body></html>');
22 doc.close();
23
24 doc.designMode = 'on';
25 this.resize();
26
27 window.setTimeout(function() {
28 ifr.contentWindow.focus();
29 }, 10);
30 },
31
32 insert : function() {
33 var h = document.getElementById('iframe').contentWindow.document.body.innerHTML;
34
35 tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h, wordContent : true});
36 tinyMCEPopup.close();
37 },
38
39 resize : function() {
40 var vp = tinyMCEPopup.dom.getViewPort(window), el;
41
42 el = document.getElementById('iframe');
43
44 if (el) {
45 el.style.width = (vp.w - 20) + 'px';
46 el.style.height = (vp.h - 90) + 'px';
47 }
48 }
49};
50
51tinyMCEPopup.onInit.add(PasteWordDialog.init, PasteWordDialog);