1window.mapconTinyMce = window.mapconTinyMce || { 2 init: function (elementId, containerId, initialContent, height) { 3 if (!window.tinymce) { 4 throw new Error("TinyMCE script is not loaded."); 5 } 6 7 if (!window._mapconTinyMceFocusPatchInstalled) { 8 document.addEventListener('focusin', function (e) { 9 var target = e.target; 10 if (target && target.closest && target.closest('.tox-tinymce-aux, .tox-dialog, .tox-menu, .tox-collection')) { 11 e.stopImmediatePropagation(); 12 } 13 }, true); 14 15 window._mapconTinyMceFocusPatchInstalled = true; 16 } 17 18 var existing = window.tinymce.get(elementId); 19 if (existing) { 20 existing.remove(); 21 } 22 23 var target = document.getElementById(elementId); 24 if (!target) { 25 throw new Error("TinyMCE target element '" + elementId + "' was not found."); 26 } 27 28 var mudDialogContent = target.closest('.mud-dialog-content'); 29 if (mudDialogContent) { 30 mudDialogContent.style.overflow = 'visible'; 31 } 32 33 var mudDialog = target.closest('.mud-dialog'); 34 if (mudDialog) { 35 mudDialog.style.overflow = 'visible'; 36 } 37 38 var mudPaper = target.closest('.mud-paper'); 39 if (mudPaper) { 40 mudPaper.style.overflow = 'visible'; 41 } 42 43 return window.tinymce.init({ 44 target: target, 45 base_url: "/lib/tinymce", 46 suffix: ".min", 47 promotion: false, 48 branding: false, 49 menubar: false, 50 license_key: "gpl", 51 height: height || 520, 52 zindex: 100000, 53 plugins: "lists link image table code fullscreen preview", 54 toolbar: "undo redo | blocks | bold italic underline | bullist numlist | link image table | code fullscreen preview", 55 content_style: "body { font-family:Roboto,Arial,sans-serif; font-size:14px }", 56 setup: function (editor) { 57 editor.on("init", function () { 58 editor.setContent(initialContent || ""); 59 }); 60 } 61 }); 62 }, 63 64 getContent: function (elementId) { 65 var editor = window.tinymce ? window.tinymce.get(elementId) : null; 66 return editor ? editor.getContent() : ""; 67 }, 68 69 setContent: function (elementId, content) { 70 var editor = window.tinymce ? window.tinymce.get(elementId) : null; 71 if (editor) { 72 editor.setContent(content || ""); 73 } 74 }, 75 76 dispose: function (elementId) { 77 var editor = window.tinymce ? window.tinymce.get(elementId) : null; 78 if (editor) { 79 editor.remove(); 80 } 81 } 82};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.