diff --git a/amd/build/environment_atto.min.js b/amd/build/environment_atto.min.js index e07ceb0..ee5ad9a 100644 --- a/amd/build/environment_atto.min.js +++ b/amd/build/environment_atto.min.js @@ -2,23 +2,6 @@ define("local_wproofreader/environment_atto",["exports"],(function(_exports){Obj /** * Atto editor integration. * - * Atto renders each editor as `
` - * in the main document. Three signals drive attachment so we are resilient to - * Atto initializing before, during, or after the bundle: - * - * 1. A `MutationObserver` watching both `childList` and the `contenteditable` - * attribute catches every editor Atto creates while the page is alive. - * It is installed before the initial sweep so editors that appear during - * that sweep are not missed. - * 2. An immediate sweep of the existing DOM picks up editors Atto already - * finished building before this module ran (the observer only sees - * mutations, not initial state). - * 3. The `webspellcheckerAlreadyLoaded` global the bundle calls when its - * own autoSearch pass finishes triggers one more rescan as a safety net. - * - * Atto is only present in Moodle 4.5 LTS. From Moodle 5.0 onward the selector - * matches nothing and the module is a no-op. - * * @module local_wproofreader/environment_atto * @copyright 2026 WebSpellChecker * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later diff --git a/amd/build/environment_atto.min.js.map b/amd/build/environment_atto.min.js.map index beb1d72..5172adb 100644 --- a/amd/build/environment_atto.min.js.map +++ b/amd/build/environment_atto.min.js.map @@ -1 +1 @@ -{"version":3,"file":"environment_atto.min.js","sources":["../src/environment_atto.js"],"sourcesContent":["// This file is part of Moodle - https://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see .\n\n/**\n * Atto editor integration.\n *\n * Atto renders each editor as `
`\n * in the main document. Three signals drive attachment so we are resilient to\n * Atto initializing before, during, or after the bundle:\n *\n * 1. A `MutationObserver` watching both `childList` and the `contenteditable`\n * attribute catches every editor Atto creates while the page is alive.\n * It is installed before the initial sweep so editors that appear during\n * that sweep are not missed.\n * 2. An immediate sweep of the existing DOM picks up editors Atto already\n * finished building before this module ran (the observer only sees\n * mutations, not initial state).\n * 3. The `webspellcheckerAlreadyLoaded` global the bundle calls when its\n * own autoSearch pass finishes triggers one more rescan as a safety net.\n *\n * Atto is only present in Moodle 4.5 LTS. From Moodle 5.0 onward the selector\n * matches nothing and the module is a no-op.\n *\n * @module local_wproofreader/environment_atto\n * @copyright 2026 WebSpellChecker\n * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nconst SELECTORS = [\n '.editor_atto_content[contenteditable=\"true\"]',\n '.editor_atto [contenteditable=\"true\"]',\n];\nconst INSTANCE_ATTR = 'data-wsc-instance';\n\nlet observer = null;\nlet hookInstalled = false;\n\nconst findEditors = () => {\n const seen = new Set();\n SELECTORS.forEach((selector) => {\n document.querySelectorAll(selector).forEach((element) => seen.add(element));\n });\n return Array.from(seen);\n};\n\nconst isInstanceCreated = (element) => element.hasAttribute(INSTANCE_ATTR);\n\nconst createInstance = (element) => {\n if (!element || !element.isContentEditable || isInstanceCreated(element) || !window.WEBSPELLCHECKER) {\n return;\n }\n\n element.setAttribute(INSTANCE_ATTR, '1');\n\n try {\n window.WEBSPELLCHECKER.init({container: element});\n } catch (e) {\n element.removeAttribute(INSTANCE_ATTR);\n if (window.console && window.console.warn) {\n window.console.warn('WProofreader: failed to attach to Atto editor', e);\n }\n }\n};\n\nconst scanAndInit = () => {\n findEditors().forEach(createInstance);\n};\n\nconst startObserver = () => {\n if (observer || typeof MutationObserver === 'undefined') {\n return;\n }\n\n observer = new MutationObserver(() => {\n scanAndInit();\n });\n\n observer.observe(document.body, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['contenteditable'],\n });\n};\n\nconst hookBundleReady = () => {\n if (hookInstalled) {\n return;\n }\n hookInstalled = true;\n\n const previous = window.webspellcheckerAlreadyLoaded;\n window.webspellcheckerAlreadyLoaded = function() {\n if (typeof previous === 'function') {\n try {\n previous.apply(this, arguments);\n } catch (e) {\n // Preserve original callback contract on failure.\n }\n }\n scanAndInit();\n };\n};\n\n/**\n * Initialize the Atto editor environment.\n */\nexport const init = () => {\n hookBundleReady();\n startObserver();\n scanAndInit();\n};\n"],"names":["SELECTORS","observer","hookInstalled","createInstance","element","isContentEditable","hasAttribute","isInstanceCreated","window","WEBSPELLCHECKER","setAttribute","init","container","e","removeAttribute","console","warn","scanAndInit","seen","Set","forEach","selector","document","querySelectorAll","add","Array","from","findEditors","hookBundleReady","previous","webspellcheckerAlreadyLoaded","apply","this","arguments","MutationObserver","observe","body","childList","subtree","attributes","attributeFilter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;MAwCMA,UAAY,CACd,+CACA,6CAIAC,SAAW,KACXC,eAAgB,QAYdC,eAAkBC,aACfA,SAAYA,QAAQC,oBAHFD,CAAAA,SAAYA,QAAQE,aAbzB,qBAgB4BC,CAAkBH,UAAaI,OAAOC,iBAIpFL,QAAQM,aApBU,oBAoBkB,SAGhCF,OAAOC,gBAAgBE,KAAK,CAACC,UAAWR,UAC1C,MAAOS,GACLT,QAAQU,gBAzBM,qBA0BVN,OAAOO,SAAWP,OAAOO,QAAQC,MACjCR,OAAOO,QAAQC,KAAK,gDAAiDH,MAK3EI,YAAc,KA3BA,YACVC,KAAO,IAAIC,WACjBnB,UAAUoB,SAASC,WACfC,SAASC,iBAAiBF,UAAUD,SAAShB,SAAYc,KAAKM,IAAIpB,cAE/DqB,MAAMC,KAAKR,OAuBlBS,GAAcP,QAAQjB,iBAoBpByB,gBAAkB,QAChB1B,qBAGJA,eAAgB,QAEV2B,SAAWrB,OAAOsB,6BACxBtB,OAAOsB,6BAA+B,cACV,mBAAbD,aAEHA,SAASE,MAAMC,KAAMC,WACvB,MAAOpB,IAIbI,8BAOY,KAChBW,kBAvCI3B,UAAwC,oBAArBiC,mBAIvBjC,SAAW,IAAIiC,kBAAiB,KAC5BjB,iBAGJhB,SAASkC,QAAQb,SAASc,KAAM,CAC5BC,WAAW,EACXC,SAAS,EACTC,YAAY,EACZC,gBAAiB,CAAC,sBA6BtBvB"} \ No newline at end of file +{"version":3,"file":"environment_atto.min.js","sources":["../src/environment_atto.js"],"sourcesContent":["// This file is part of Moodle - https://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see .\n\n/**\n * Atto editor integration.\n *\n * @module local_wproofreader/environment_atto\n * @copyright 2026 WebSpellChecker\n * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nconst SELECTORS = [\n '.editor_atto_content[contenteditable=\"true\"]',\n '.editor_atto [contenteditable=\"true\"]',\n];\nconst INSTANCE_ATTR = 'data-wsc-instance';\n\nlet observer = null;\nlet hookInstalled = false;\n\nconst findEditors = () => {\n const seen = new Set();\n SELECTORS.forEach((selector) => {\n document.querySelectorAll(selector).forEach((element) => seen.add(element));\n });\n return Array.from(seen);\n};\n\nconst isInstanceCreated = (element) => element.hasAttribute(INSTANCE_ATTR);\n\nconst createInstance = (element) => {\n if (!element || !element.isContentEditable || isInstanceCreated(element) || !window.WEBSPELLCHECKER) {\n return;\n }\n\n element.setAttribute(INSTANCE_ATTR, '1');\n\n try {\n window.WEBSPELLCHECKER.init({container: element});\n } catch (e) {\n element.removeAttribute(INSTANCE_ATTR);\n if (window.console && window.console.warn) {\n window.console.warn('WProofreader: failed to attach to Atto editor', e);\n }\n }\n};\n\nconst scanAndInit = () => {\n findEditors().forEach(createInstance);\n};\n\nconst startObserver = () => {\n if (observer || typeof MutationObserver === 'undefined') {\n return;\n }\n\n observer = new MutationObserver(() => {\n scanAndInit();\n });\n\n observer.observe(document.body, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['contenteditable'],\n });\n};\n\nconst hookBundleReady = () => {\n if (hookInstalled) {\n return;\n }\n hookInstalled = true;\n\n const previous = window.webspellcheckerAlreadyLoaded;\n window.webspellcheckerAlreadyLoaded = function() {\n if (typeof previous === 'function') {\n try {\n previous.apply(this, arguments);\n } catch (e) {\n // Preserve original callback contract on failure.\n }\n }\n scanAndInit();\n };\n};\n\n/**\n * Initialize the Atto editor environment.\n */\nexport const init = () => {\n hookBundleReady();\n startObserver();\n scanAndInit();\n};\n"],"names":["SELECTORS","observer","hookInstalled","createInstance","element","isContentEditable","hasAttribute","isInstanceCreated","window","WEBSPELLCHECKER","setAttribute","init","container","e","removeAttribute","console","warn","scanAndInit","seen","Set","forEach","selector","document","querySelectorAll","add","Array","from","findEditors","hookBundleReady","previous","webspellcheckerAlreadyLoaded","apply","this","arguments","MutationObserver","observe","body","childList","subtree","attributes","attributeFilter"],"mappings":";;;;;;;;MAuBMA,UAAY,CACd,+CACA,6CAIAC,SAAW,KACXC,eAAgB,QAYdC,eAAkBC,aACfA,SAAYA,QAAQC,oBAHFD,CAAAA,SAAYA,QAAQE,aAbzB,qBAgB4BC,CAAkBH,UAAaI,OAAOC,iBAIpFL,QAAQM,aApBU,oBAoBkB,SAGhCF,OAAOC,gBAAgBE,KAAK,CAACC,UAAWR,UAC1C,MAAOS,GACLT,QAAQU,gBAzBM,qBA0BVN,OAAOO,SAAWP,OAAOO,QAAQC,MACjCR,OAAOO,QAAQC,KAAK,gDAAiDH,MAK3EI,YAAc,KA3BA,YACVC,KAAO,IAAIC,WACjBnB,UAAUoB,SAASC,WACfC,SAASC,iBAAiBF,UAAUD,SAAShB,SAAYc,KAAKM,IAAIpB,cAE/DqB,MAAMC,KAAKR,OAuBlBS,GAAcP,QAAQjB,iBAoBpByB,gBAAkB,QAChB1B,qBAGJA,eAAgB,QAEV2B,SAAWrB,OAAOsB,6BACxBtB,OAAOsB,6BAA+B,cACV,mBAAbD,aAEHA,SAASE,MAAMC,KAAMC,WACvB,MAAOpB,IAIbI,8BAOY,KAChBW,kBAvCI3B,UAAwC,oBAArBiC,mBAIvBjC,SAAW,IAAIiC,kBAAiB,KAC5BjB,iBAGJhB,SAASkC,QAAQb,SAASc,KAAM,CAC5BC,WAAW,EACXC,SAAS,EACTC,YAAY,EACZC,gBAAiB,CAAC,sBA6BtBvB"} \ No newline at end of file diff --git a/amd/build/environment_textarea.min.js b/amd/build/environment_textarea.min.js index 0948b81..0948c73 100644 --- a/amd/build/environment_textarea.min.js +++ b/amd/build/environment_textarea.min.js @@ -2,13 +2,6 @@ define("local_wproofreader/environment_textarea",["exports"],(function(_exports) /** * Plain HTML textarea integration. * - * Moodle exposes textareas in many places where neither Atto nor TinyMCE is - * active: filter settings forms, the file picker, the "plain text area" editor - * choice, and so on. The bundle's autoSearch already picks these up; this - * module only filters out textareas where proofreading would be inappropriate - * (raw HTML, CSS, JavaScript snippets) by tagging them with a class the - * disableAutoSearchIn list looks for. - * * @module local_wproofreader/environment_textarea * @copyright 2026 WebSpellChecker * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later diff --git a/amd/build/environment_textarea.min.js.map b/amd/build/environment_textarea.min.js.map index 82ed783..9626913 100644 --- a/amd/build/environment_textarea.min.js.map +++ b/amd/build/environment_textarea.min.js.map @@ -1 +1 @@ -{"version":3,"file":"environment_textarea.min.js","sources":["../src/environment_textarea.js"],"sourcesContent":["// This file is part of Moodle - https://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see .\n\n/**\n * Plain HTML textarea integration.\n *\n * Moodle exposes textareas in many places where neither Atto nor TinyMCE is\n * active: filter settings forms, the file picker, the \"plain text area\" editor\n * choice, and so on. The bundle's autoSearch already picks these up; this\n * module only filters out textareas where proofreading would be inappropriate\n * (raw HTML, CSS, JavaScript snippets) by tagging them with a class the\n * disableAutoSearchIn list looks for.\n *\n * @module local_wproofreader/environment_textarea\n * @copyright 2026 WebSpellChecker\n * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nconst SKIP_CLASS = 'wsc-skip-autosearch';\nconst CODE_FIELD_HINTS = [\n 'id$=\"customcss\"',\n 'id$=\"custommenuitems\"',\n 'name=\"customcss\"',\n 'name=\"s_theme_boost_customcss\"',\n 'name$=\"[customcss]\"',\n];\n\nconst tagSkippableTextareas = () => {\n const selectors = CODE_FIELD_HINTS.map((hint) => `textarea[${hint}]`).join(',');\n\n document.querySelectorAll(selectors).forEach((textarea) => {\n textarea.classList.add(SKIP_CLASS);\n });\n};\n\n/**\n * Initialize the textarea environment.\n *\n * @param {Object} config Page configuration (mutated to extend disableAutoSearchIn).\n */\nexport const init = (config) => {\n tagSkippableTextareas();\n\n if (window.WEBSPELLCHECKER_CONFIG && Array.isArray(window.WEBSPELLCHECKER_CONFIG.disableAutoSearchIn)) {\n const skipSelector = `.${SKIP_CLASS}`;\n if (!window.WEBSPELLCHECKER_CONFIG.disableAutoSearchIn.includes(skipSelector)) {\n window.WEBSPELLCHECKER_CONFIG.disableAutoSearchIn.push(skipSelector);\n }\n }\n\n // Keep the parameter signature consistent for the init dispatcher even though\n // we do not currently use the rest of the config here.\n void config;\n};\n"],"names":["CODE_FIELD_HINTS","config","selectors","map","hint","join","document","querySelectorAll","forEach","textarea","classList","add","tagSkippableTextareas","window","WEBSPELLCHECKER_CONFIG","Array","isArray","disableAutoSearchIn","skipSelector","includes","push"],"mappings":";;;;;;;;;;;;;;;MA+BMA,iBAAmB,CACrB,kBACA,wBACA,mBACA,iCACA,qCAgBiBC,YAbS,YACpBC,UAAYF,iBAAiBG,KAAKC,yBAAqBA,YAASC,KAAK,KAE3EC,SAASC,iBAAiBL,WAAWM,SAASC,WAC1CA,SAASC,UAAUC,IAbR,2BAuBfC,GAEIC,OAAOC,wBAA0BC,MAAMC,QAAQH,OAAOC,uBAAuBG,qBAAsB,OAC7FC,wBA1BK,uBA2BNL,OAAOC,uBAAuBG,oBAAoBE,SAASD,eAC5DL,OAAOC,uBAAuBG,oBAAoBG,KAAKF"} \ No newline at end of file +{"version":3,"file":"environment_textarea.min.js","sources":["../src/environment_textarea.js"],"sourcesContent":["// This file is part of Moodle - https://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see .\n\n/**\n * Plain HTML textarea integration.\n *\n * @module local_wproofreader/environment_textarea\n * @copyright 2026 WebSpellChecker\n * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nconst SKIP_CLASS = 'wsc-skip-autosearch';\nconst CODE_FIELD_HINTS = [\n 'id$=\"customcss\"',\n 'id$=\"custommenuitems\"',\n 'name=\"customcss\"',\n 'name=\"s_theme_boost_customcss\"',\n 'name$=\"[customcss]\"',\n];\n\nconst tagSkippableTextareas = () => {\n const selectors = CODE_FIELD_HINTS.map((hint) => `textarea[${hint}]`).join(',');\n\n document.querySelectorAll(selectors).forEach((textarea) => {\n textarea.classList.add(SKIP_CLASS);\n });\n};\n\n/**\n * Initialize the textarea environment.\n *\n * @param {Object} config Page configuration (mutated to extend disableAutoSearchIn).\n */\nexport const init = (config) => {\n tagSkippableTextareas();\n\n if (window.WEBSPELLCHECKER_CONFIG && Array.isArray(window.WEBSPELLCHECKER_CONFIG.disableAutoSearchIn)) {\n const skipSelector = `.${SKIP_CLASS}`;\n if (!window.WEBSPELLCHECKER_CONFIG.disableAutoSearchIn.includes(skipSelector)) {\n window.WEBSPELLCHECKER_CONFIG.disableAutoSearchIn.push(skipSelector);\n }\n }\n\n // Keep the parameter signature consistent for the init dispatcher even though\n // we do not currently use the rest of the config here.\n void config;\n};\n"],"names":["CODE_FIELD_HINTS","config","selectors","map","hint","join","document","querySelectorAll","forEach","textarea","classList","add","tagSkippableTextareas","window","WEBSPELLCHECKER_CONFIG","Array","isArray","disableAutoSearchIn","skipSelector","includes","push"],"mappings":";;;;;;;;MAwBMA,iBAAmB,CACrB,kBACA,wBACA,mBACA,iCACA,qCAgBiBC,YAbS,YACpBC,UAAYF,iBAAiBG,KAAKC,yBAAqBA,YAASC,KAAK,KAE3EC,SAASC,iBAAiBL,WAAWM,SAASC,WAC1CA,SAASC,UAAUC,IAbR,2BAuBfC,GAEIC,OAAOC,wBAA0BC,MAAMC,QAAQH,OAAOC,uBAAuBG,qBAAsB,OAC7FC,wBA1BK,uBA2BNL,OAAOC,uBAAuBG,oBAAoBE,SAASD,eAC5DL,OAAOC,uBAAuBG,oBAAoBG,KAAKF"} \ No newline at end of file diff --git a/amd/build/environment_tinymce.min.js b/amd/build/environment_tinymce.min.js index 929b6f3..787f11d 100644 --- a/amd/build/environment_tinymce.min.js +++ b/amd/build/environment_tinymce.min.js @@ -1,3 +1,3 @@ -define("local_wproofreader/environment_tinymce",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0;let listening=!1,attempts=0;const attachTo=editor=>{if(!editor||!window.WEBSPELLCHECKER||!window.WEBSPELLCHECKER_CONFIG)return;const iframe=editor.iframeElement||editor.getContentAreaContainer&&editor.getContentAreaContainer().querySelector("iframe");if(iframe&&!(iframe=>{const body=iframe.contentDocument&&iframe.contentDocument.body;return Boolean(body&&body.hasAttribute("data-wsc-instance"))})(iframe))try{window.WEBSPELLCHECKER.init(Object.assign({},window.WEBSPELLCHECKER_CONFIG,{container:iframe})),(iframe=>{const body=iframe.contentDocument&&iframe.contentDocument.body;body&&body.setAttribute("data-wsc-instance","1")})(iframe)}catch(e){window.console&&window.console.warn&&window.console.warn("WProofreader: failed to attach to TinyMCE editor",e)}},hookEditor=editor=>{editor&&(editor.initialized?attachTo(editor):"function"==typeof editor.on&&editor.on("init",(()=>attachTo(editor))))},poll=()=>{attempts++,(()=>{if(!window.tinymce)return!1;const raw=window.tinymce.editors;let editors=[];return Array.isArray(raw)?editors=raw:raw&&(editors=Array.from(raw)),editors.forEach(hookEditor),listening||"function"!=typeof window.tinymce.on||(listening=!0,window.tinymce.on("AddEditor",(event=>{event&&event.editor&&hookEditor(event.editor)}))),!0})()||attempts<50&&setTimeout(poll,100)};_exports.init=()=>{poll()}})); +define("local_wproofreader/environment_tinymce",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0;let observer=null,hookInstalled=!1;const unmark=iframe=>iframe.removeAttribute("data-wsc-instance"),initInstance=iframe=>{const doc=iframe.contentDocument;if(doc&&doc.body)try{window.WEBSPELLCHECKER.init(Object.assign({},window.WEBSPELLCHECKER_CONFIG,{container:iframe}))}catch(e){unmark(iframe),window.console&&window.console.warn&&window.console.warn("WProofreader: failed to attach to TinyMCE editor",e)}else unmark(iframe)},attach=iframe=>{if(!iframe||(iframe=>iframe.hasAttribute("data-wsc-instance"))(iframe)||!window.WEBSPELLCHECKER||!window.WEBSPELLCHECKER_CONFIG)return;(iframe=>{iframe.setAttribute("data-wsc-instance","1")})(iframe);const editor=(iframe=>window.tinymce&&"function"==typeof window.tinymce.get&&(window.tinymce.get()||[]).find((editor=>editor&&editor.iframeElement===iframe))||null)(iframe);!editor||editor.initialized||"function"!=typeof editor.on?initInstance(iframe):editor.on("init",(()=>initInstance(iframe)))},scanAndInit=()=>{Array.from(document.querySelectorAll("iframe.tox-edit-area__iframe")).forEach(attach)},hookBundleReady=()=>{if(hookInstalled)return;hookInstalled=!0;const previous=window.webspellcheckerAlreadyLoaded;window.webspellcheckerAlreadyLoaded=function(){if("function"==typeof previous)try{previous.apply(this,arguments)}catch(e){}scanAndInit()}};_exports.init=()=>{hookBundleReady(),observer||"undefined"==typeof MutationObserver||(observer=new MutationObserver((()=>{scanAndInit()})),observer.observe(document.body,{childList:!0,subtree:!0})),scanAndInit()}})); //# sourceMappingURL=environment_tinymce.min.js.map \ No newline at end of file diff --git a/amd/build/environment_tinymce.min.js.map b/amd/build/environment_tinymce.min.js.map index 6e48a08..b936e84 100644 --- a/amd/build/environment_tinymce.min.js.map +++ b/amd/build/environment_tinymce.min.js.map @@ -1 +1 @@ -{"version":3,"file":"environment_tinymce.min.js","sources":["../src/environment_tinymce.js"],"sourcesContent":["// This file is part of Moodle - https://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see .\n\n/**\n * TinyMCE 6 editor integration.\n *\n * Each TinyMCE editor renders its editable content inside an `