diff --git a/lib/editor/tiny/plugins/media/amd/build/commands.min.js b/lib/editor/tiny/plugins/media/amd/build/commands.min.js index 5f8666e2b7f..6af7d31c129 100644 --- a/lib/editor/tiny/plugins/media/amd/build/commands.min.js +++ b/lib/editor/tiny/plugins/media/amd/build/commands.min.js @@ -6,6 +6,6 @@ define("tiny_media/commands",["exports","core/str","./common","./image","./embed * @copyright 2022 Huong Nguyen * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -const isImage=node=>"img"===node.nodeName.toLowerCase(),isVideo=node=>"video"===node.nodeName.toLowerCase()||"audio"===node.nodeName.toLowerCase();_exports.getSetup=async()=>{const[imageButtonText,videoButtonText,mediaManagerButtonText]=await(0,_str.get_strings)(["imagebuttontitle","videobuttontitle","mediamanagerbuttontitle"].map((key=>({key:key,component:_common.component})))),[mediaManagerButtonImage]=await Promise.all([(0,_utils.getButtonImage)("filemanager",_common.component)]);return editor=>{((editor,imageButtonText)=>{const handleImageAction=()=>{new _image.MediaImage(editor).displayDialogue()};editor.ui.registry.addToggleButton(_common.imageButtonName,{icon:"image",tooltip:imageButtonText,onAction:handleImageAction,onSetup:api=>editor.selection.selectorChangedWithUnbind("img:not([data-mce-object]):not([data-mce-placeholder]),figure.image",api.setActive).unbind}),editor.ui.registry.addMenuItem(_common.imageButtonName,{icon:"image",text:imageButtonText,onAction:handleImageAction}),editor.ui.registry.addContextToolbar(_common.imageButtonName,{predicate:isImage,items:_common.imageButtonName,position:"node",scope:"node"}),editor.ui.registry.addContextMenu(_common.imageButtonName,{update:isImage})})(editor,imageButtonText),((editor,videoButtonText)=>{const handleEmbedAction=()=>{new _embed.MediaEmbed(editor).displayDialogue()};editor.ui.registry.addToggleButton(_common.videoButtonName,{icon:"embed",tooltip:videoButtonText,onAction:handleEmbedAction,onSetup:api=>editor.selection.selectorChangedWithUnbind("video:not([data-mce-object]):not([data-mce-placeholder]),audio:not([data-mce-object]):not([data-mce-placeholder])",api.setActive).unbind}),editor.ui.registry.addMenuItem(_common.videoButtonName,{icon:"embed",text:videoButtonText,onAction:handleEmbedAction}),editor.ui.registry.addContextMenu(_common.videoButtonName,{update:isVideo}),editor.ui.registry.addContextToolbar(_common.videoButtonName,{predicate:isVideo,items:_common.videoButtonName,position:"node",scope:"node"})})(editor,videoButtonText),((editor,mediaManagerButtonText,mediaManagerButtonImage)=>{const handleMediaManager=()=>{new _manager.MediaManager(editor).displayDialogue()};editor.ui.registry.addIcon("filemanager",mediaManagerButtonImage.html),editor.ui.registry.addButton(_common.mediaManagerButtonName,{icon:"filemanager",tooltip:mediaManagerButtonText,onAction:()=>{handleMediaManager()}}),editor.ui.registry.addMenuItem(_common.mediaManagerButtonName,{icon:"filemanager",text:mediaManagerButtonText,onAction:()=>{handleMediaManager()}})})(editor,mediaManagerButtonText,mediaManagerButtonImage)}}})); +const isImage=node=>"img"===node.nodeName.toLowerCase(),isVideo=node=>"video"===node.nodeName.toLowerCase()||"audio"===node.nodeName.toLowerCase();_exports.getSetup=async()=>{const[imageButtonText,mediaButtonText,mediaManagerButtonText]=await(0,_str.get_strings)(["imagebuttontitle","mediabuttontitle","mediamanagerbuttontitle"].map((key=>({key:key,component:_common.component})))),[mediaManagerButtonImage]=await Promise.all([(0,_utils.getButtonImage)("filemanager",_common.component)]);return editor=>{((editor,imageButtonText)=>{const handleImageAction=()=>{new _image.MediaImage(editor).displayDialogue()};editor.ui.registry.addToggleButton(_common.imageButtonName,{icon:"image",tooltip:imageButtonText,onAction:handleImageAction,onSetup:api=>editor.selection.selectorChangedWithUnbind("img:not([data-mce-object]):not([data-mce-placeholder]),figure.image",api.setActive).unbind}),editor.ui.registry.addMenuItem(_common.imageButtonName,{icon:"image",text:imageButtonText,onAction:handleImageAction}),editor.ui.registry.addContextToolbar(_common.imageButtonName,{predicate:isImage,items:_common.imageButtonName,position:"node",scope:"node"}),editor.ui.registry.addContextMenu(_common.imageButtonName,{update:isImage})})(editor,imageButtonText),((editor,videoButtonText)=>{const handleEmbedAction=()=>{new _embed.MediaEmbed(editor).displayDialogue()};editor.ui.registry.addToggleButton(_common.videoButtonName,{icon:"embed",tooltip:videoButtonText,onAction:handleEmbedAction,onSetup:api=>editor.selection.selectorChangedWithUnbind("video:not([data-mce-object]):not([data-mce-placeholder]),audio:not([data-mce-object]):not([data-mce-placeholder])",api.setActive).unbind}),editor.ui.registry.addMenuItem(_common.videoButtonName,{icon:"embed",text:videoButtonText,onAction:handleEmbedAction}),editor.ui.registry.addContextMenu(_common.videoButtonName,{update:isVideo}),editor.ui.registry.addContextToolbar(_common.videoButtonName,{predicate:isVideo,items:_common.videoButtonName,position:"node",scope:"node"})})(editor,mediaButtonText),((editor,mediaManagerButtonText,mediaManagerButtonImage)=>{const handleMediaManager=()=>{new _manager.MediaManager(editor).displayDialogue()};editor.ui.registry.addIcon("filemanager",mediaManagerButtonImage.html),editor.ui.registry.addButton(_common.mediaManagerButtonName,{icon:"filemanager",tooltip:mediaManagerButtonText,onAction:()=>{handleMediaManager()}}),editor.ui.registry.addMenuItem(_common.mediaManagerButtonName,{icon:"filemanager",text:mediaManagerButtonText,onAction:()=>{handleMediaManager()}})})(editor,mediaManagerButtonText,mediaManagerButtonImage)}}})); //# sourceMappingURL=commands.min.js.map \ No newline at end of file diff --git a/lib/editor/tiny/plugins/media/amd/build/commands.min.js.map b/lib/editor/tiny/plugins/media/amd/build/commands.min.js.map index 5df8a324d43..ecb49fee816 100644 --- a/lib/editor/tiny/plugins/media/amd/build/commands.min.js.map +++ b/lib/editor/tiny/plugins/media/amd/build/commands.min.js.map @@ -1 +1 @@ -{"version":3,"file":"commands.min.js","sources":["../src/commands.js"],"sourcesContent":["// This file is part of Moodle - http://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 * Tiny Media commands.\n *\n * @module tiny_media/commands\n * @copyright 2022 Huong Nguyen \n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nimport {get_strings as getStrings} from 'core/str';\nimport {\n component,\n imageButtonName,\n videoButtonName,\n mediaManagerButtonName\n} from './common';\nimport {MediaImage} from './image';\nimport {MediaEmbed} from './embed';\nimport {MediaManager} from './manager';\nimport {getButtonImage} from 'editor_tiny/utils';\n\nconst isImage = (node) => node.nodeName.toLowerCase() === 'img';\nconst isVideo = (node) => node.nodeName.toLowerCase() === 'video' || node.nodeName.toLowerCase() === 'audio';\n\nconst registerImageCommand = (editor, imageButtonText) => {\n const imageIcon = 'image';\n const handleImageAction = () => {\n const mediaImage = new MediaImage(editor);\n mediaImage.displayDialogue();\n };\n\n // Register the Menu Button as a toggle.\n // This means that when highlighted over an existing Media Image element it will show as toggled on.\n editor.ui.registry.addToggleButton(imageButtonName, {\n icon: imageIcon,\n tooltip: imageButtonText,\n onAction: handleImageAction,\n onSetup: api => {\n return editor.selection.selectorChangedWithUnbind(\n 'img:not([data-mce-object]):not([data-mce-placeholder]),figure.image',\n api.setActive\n ).unbind;\n }\n });\n\n editor.ui.registry.addMenuItem(imageButtonName, {\n icon: imageIcon,\n text: imageButtonText,\n onAction: handleImageAction,\n });\n\n editor.ui.registry.addContextToolbar(imageButtonName, {\n predicate: isImage,\n items: imageButtonName,\n position: 'node',\n scope: 'node'\n });\n\n editor.ui.registry.addContextMenu(imageButtonName, {\n update: isImage,\n });\n};\n\nconst registerEmbedCommand = (editor, videoButtonText) => {\n const videoIcon = 'embed';\n const handleEmbedAction = () => {\n const mediaImage = new MediaEmbed(editor);\n mediaImage.displayDialogue();\n };\n\n // Register the Menu Button as a toggle.\n // This means that when highlighted over an existing Media Video element it will show as toggled on.\n editor.ui.registry.addToggleButton(videoButtonName, {\n icon: videoIcon,\n tooltip: videoButtonText,\n onAction: handleEmbedAction,\n onSetup: api => {\n return editor.selection.selectorChangedWithUnbind(\n 'video:not([data-mce-object]):not([data-mce-placeholder]),' +\n 'audio:not([data-mce-object]):not([data-mce-placeholder])',\n api.setActive\n ).unbind;\n }\n });\n\n editor.ui.registry.addMenuItem(videoButtonName, {\n icon: videoIcon,\n text: videoButtonText,\n onAction: handleEmbedAction,\n });\n\n editor.ui.registry.addContextMenu(videoButtonName, {\n update: isVideo,\n });\n\n editor.ui.registry.addContextToolbar(videoButtonName, {\n predicate: isVideo,\n items: videoButtonName,\n position: 'node',\n scope: 'node'\n });\n\n};\n\nconst registerManagerCommand = (editor, mediaManagerButtonText, mediaManagerButtonImage) => {\n const mediaManagerIcon = 'filemanager';\n const handleMediaManager = () => {\n const mediaManager = new MediaManager(editor);\n mediaManager.displayDialogue();\n };\n\n // Register the Menu Button as a toggle.\n editor.ui.registry.addIcon(mediaManagerIcon, mediaManagerButtonImage.html);\n editor.ui.registry.addButton(mediaManagerButtonName, {\n icon: mediaManagerIcon,\n tooltip: mediaManagerButtonText,\n onAction: () => {\n handleMediaManager();\n }\n });\n\n editor.ui.registry.addMenuItem(mediaManagerButtonName, {\n icon: mediaManagerIcon,\n text: mediaManagerButtonText,\n onAction: () => {\n handleMediaManager();\n }\n });\n};\n\nexport const getSetup = async() => {\n const [\n imageButtonText,\n videoButtonText,\n mediaManagerButtonText\n ] = await getStrings(['imagebuttontitle', 'videobuttontitle', 'mediamanagerbuttontitle'].map((key) => ({key, component})));\n\n const [\n mediaManagerButtonImage,\n ] = await Promise.all([\n getButtonImage('filemanager', component)\n ]);\n\n // Note: The function returned here must be synchronous and cannot use promises.\n // All promises must be resolved prior to returning the function.\n return (editor) => {\n registerImageCommand(editor, imageButtonText);\n registerEmbedCommand(editor, videoButtonText);\n registerManagerCommand(editor, mediaManagerButtonText, mediaManagerButtonImage);\n };\n};\n"],"names":["isImage","node","nodeName","toLowerCase","isVideo","async","imageButtonText","videoButtonText","mediaManagerButtonText","map","key","component","mediaManagerButtonImage","Promise","all","editor","handleImageAction","MediaImage","displayDialogue","ui","registry","addToggleButton","imageButtonName","icon","tooltip","onAction","onSetup","api","selection","selectorChangedWithUnbind","setActive","unbind","addMenuItem","text","addContextToolbar","predicate","items","position","scope","addContextMenu","update","registerImageCommand","handleEmbedAction","MediaEmbed","videoButtonName","registerEmbedCommand","handleMediaManager","MediaManager","addIcon","html","addButton","mediaManagerButtonName","registerManagerCommand"],"mappings":";;;;;;;;MAmCMA,QAAWC,MAAyC,QAAhCA,KAAKC,SAASC,cAClCC,QAAWH,MAAyC,UAAhCA,KAAKC,SAASC,eAA6D,UAAhCF,KAAKC,SAASC,gCA4G3DE,gBAEhBC,gBACAC,gBACAC,8BACM,oBAAW,CAAC,mBAAoB,mBAAoB,2BAA2BC,KAAKC,OAAUA,IAAAA,IAAKC,UAAAA,wBAGzGC,+BACMC,QAAQC,IAAI,EAClB,yBAAe,cAAeH,4BAK1BI,SAzHiB,EAACA,OAAQT,yBAE5BU,kBAAoB,KACH,IAAIC,kBAAWF,QACvBG,mBAKfH,OAAOI,GAAGC,SAASC,gBAAgBC,wBAAiB,CAChDC,KATc,QAUdC,QAASlB,gBACTmB,SAAUT,kBACVU,QAASC,KACEZ,OAAOa,UAAUC,0BACpB,sEACAF,IAAIG,WACNC,SAIVhB,OAAOI,GAAGC,SAASY,YAAYV,wBAAiB,CAC5CC,KArBc,QAsBdU,KAAM3B,gBACNmB,SAAUT,oBAGdD,OAAOI,GAAGC,SAASc,kBAAkBZ,wBAAiB,CAClDa,UAAWnC,QACXoC,MAAOd,wBACPe,SAAU,OACVC,MAAO,SAGXvB,OAAOI,GAAGC,SAASmB,eAAejB,wBAAiB,CAC/CkB,OAAQxC,WAuFRyC,CAAqB1B,OAAQT,iBAnFR,EAACS,OAAQR,yBAE5BmC,kBAAoB,KACH,IAAIC,kBAAW5B,QACvBG,mBAKfH,OAAOI,GAAGC,SAASC,gBAAgBuB,wBAAiB,CAChDrB,KATc,QAUdC,QAASjB,gBACTkB,SAAUiB,kBACVhB,QAASC,KACEZ,OAAOa,UAAUC,0BACpB,oHAEAF,IAAIG,WACNC,SAIVhB,OAAOI,GAAGC,SAASY,YAAYY,wBAAiB,CAC5CrB,KAtBc,QAuBdU,KAAM1B,gBACNkB,SAAUiB,oBAGd3B,OAAOI,GAAGC,SAASmB,eAAeK,wBAAiB,CAC/CJ,OAAQpC,UAGZW,OAAOI,GAAGC,SAASc,kBAAkBU,wBAAiB,CAClDT,UAAW/B,QACXgC,MAAOQ,wBACPP,SAAU,OACVC,MAAO,UAgDPO,CAAqB9B,OAAQR,iBA3CN,EAACQ,OAAQP,uBAAwBI,iCAEtDkC,mBAAqB,KACF,IAAIC,sBAAahC,QACzBG,mBAIjBH,OAAOI,GAAGC,SAAS4B,QAPM,cAOoBpC,wBAAwBqC,MACrElC,OAAOI,GAAGC,SAAS8B,UAAUC,+BAAwB,CACjD5B,KATqB,cAUrBC,QAAShB,uBACTiB,SAAU,KACNqB,wBAIR/B,OAAOI,GAAGC,SAASY,YAAYmB,+BAAwB,CACnD5B,KAjBqB,cAkBrBU,KAAMzB,uBACNiB,SAAU,KACNqB,yBAuBJM,CAAuBrC,OAAQP,uBAAwBI"} \ No newline at end of file +{"version":3,"file":"commands.min.js","sources":["../src/commands.js"],"sourcesContent":["// This file is part of Moodle - http://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 * Tiny Media commands.\n *\n * @module tiny_media/commands\n * @copyright 2022 Huong Nguyen \n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nimport {get_strings as getStrings} from 'core/str';\nimport {\n component,\n imageButtonName,\n videoButtonName,\n mediaManagerButtonName\n} from './common';\nimport {MediaImage} from './image';\nimport {MediaEmbed} from './embed';\nimport {MediaManager} from './manager';\nimport {getButtonImage} from 'editor_tiny/utils';\n\nconst isImage = (node) => node.nodeName.toLowerCase() === 'img';\nconst isVideo = (node) => node.nodeName.toLowerCase() === 'video' || node.nodeName.toLowerCase() === 'audio';\n\nconst registerImageCommand = (editor, imageButtonText) => {\n const imageIcon = 'image';\n const handleImageAction = () => {\n const mediaImage = new MediaImage(editor);\n mediaImage.displayDialogue();\n };\n\n // Register the Menu Button as a toggle.\n // This means that when highlighted over an existing Media Image element it will show as toggled on.\n editor.ui.registry.addToggleButton(imageButtonName, {\n icon: imageIcon,\n tooltip: imageButtonText,\n onAction: handleImageAction,\n onSetup: api => {\n return editor.selection.selectorChangedWithUnbind(\n 'img:not([data-mce-object]):not([data-mce-placeholder]),figure.image',\n api.setActive\n ).unbind;\n }\n });\n\n editor.ui.registry.addMenuItem(imageButtonName, {\n icon: imageIcon,\n text: imageButtonText,\n onAction: handleImageAction,\n });\n\n editor.ui.registry.addContextToolbar(imageButtonName, {\n predicate: isImage,\n items: imageButtonName,\n position: 'node',\n scope: 'node'\n });\n\n editor.ui.registry.addContextMenu(imageButtonName, {\n update: isImage,\n });\n};\n\nconst registerEmbedCommand = (editor, videoButtonText) => {\n const videoIcon = 'embed';\n const handleEmbedAction = () => {\n const mediaImage = new MediaEmbed(editor);\n mediaImage.displayDialogue();\n };\n\n // Register the Menu Button as a toggle.\n // This means that when highlighted over an existing Media Video element it will show as toggled on.\n editor.ui.registry.addToggleButton(videoButtonName, {\n icon: videoIcon,\n tooltip: videoButtonText,\n onAction: handleEmbedAction,\n onSetup: api => {\n return editor.selection.selectorChangedWithUnbind(\n 'video:not([data-mce-object]):not([data-mce-placeholder]),' +\n 'audio:not([data-mce-object]):not([data-mce-placeholder])',\n api.setActive\n ).unbind;\n }\n });\n\n editor.ui.registry.addMenuItem(videoButtonName, {\n icon: videoIcon,\n text: videoButtonText,\n onAction: handleEmbedAction,\n });\n\n editor.ui.registry.addContextMenu(videoButtonName, {\n update: isVideo,\n });\n\n editor.ui.registry.addContextToolbar(videoButtonName, {\n predicate: isVideo,\n items: videoButtonName,\n position: 'node',\n scope: 'node'\n });\n\n};\n\nconst registerManagerCommand = (editor, mediaManagerButtonText, mediaManagerButtonImage) => {\n const mediaManagerIcon = 'filemanager';\n const handleMediaManager = () => {\n const mediaManager = new MediaManager(editor);\n mediaManager.displayDialogue();\n };\n\n // Register the Menu Button as a toggle.\n editor.ui.registry.addIcon(mediaManagerIcon, mediaManagerButtonImage.html);\n editor.ui.registry.addButton(mediaManagerButtonName, {\n icon: mediaManagerIcon,\n tooltip: mediaManagerButtonText,\n onAction: () => {\n handleMediaManager();\n }\n });\n\n editor.ui.registry.addMenuItem(mediaManagerButtonName, {\n icon: mediaManagerIcon,\n text: mediaManagerButtonText,\n onAction: () => {\n handleMediaManager();\n }\n });\n};\n\nexport const getSetup = async() => {\n const [\n imageButtonText,\n mediaButtonText,\n mediaManagerButtonText\n ] = await getStrings(['imagebuttontitle', 'mediabuttontitle', 'mediamanagerbuttontitle'].map((key) => ({key, component})));\n\n const [\n mediaManagerButtonImage,\n ] = await Promise.all([\n getButtonImage('filemanager', component)\n ]);\n\n // Note: The function returned here must be synchronous and cannot use promises.\n // All promises must be resolved prior to returning the function.\n return (editor) => {\n registerImageCommand(editor, imageButtonText);\n registerEmbedCommand(editor, mediaButtonText);\n registerManagerCommand(editor, mediaManagerButtonText, mediaManagerButtonImage);\n };\n};\n"],"names":["isImage","node","nodeName","toLowerCase","isVideo","async","imageButtonText","mediaButtonText","mediaManagerButtonText","map","key","component","mediaManagerButtonImage","Promise","all","editor","handleImageAction","MediaImage","displayDialogue","ui","registry","addToggleButton","imageButtonName","icon","tooltip","onAction","onSetup","api","selection","selectorChangedWithUnbind","setActive","unbind","addMenuItem","text","addContextToolbar","predicate","items","position","scope","addContextMenu","update","registerImageCommand","videoButtonText","handleEmbedAction","MediaEmbed","videoButtonName","registerEmbedCommand","handleMediaManager","MediaManager","addIcon","html","addButton","mediaManagerButtonName","registerManagerCommand"],"mappings":";;;;;;;;MAmCMA,QAAWC,MAAyC,QAAhCA,KAAKC,SAASC,cAClCC,QAAWH,MAAyC,UAAhCA,KAAKC,SAASC,eAA6D,UAAhCF,KAAKC,SAASC,gCA4G3DE,gBAEhBC,gBACAC,gBACAC,8BACM,oBAAW,CAAC,mBAAoB,mBAAoB,2BAA2BC,KAAKC,OAAUA,IAAAA,IAAKC,UAAAA,wBAGzGC,+BACMC,QAAQC,IAAI,EAClB,yBAAe,cAAeH,4BAK1BI,SAzHiB,EAACA,OAAQT,yBAE5BU,kBAAoB,KACH,IAAIC,kBAAWF,QACvBG,mBAKfH,OAAOI,GAAGC,SAASC,gBAAgBC,wBAAiB,CAChDC,KATc,QAUdC,QAASlB,gBACTmB,SAAUT,kBACVU,QAASC,KACEZ,OAAOa,UAAUC,0BACpB,sEACAF,IAAIG,WACNC,SAIVhB,OAAOI,GAAGC,SAASY,YAAYV,wBAAiB,CAC5CC,KArBc,QAsBdU,KAAM3B,gBACNmB,SAAUT,oBAGdD,OAAOI,GAAGC,SAASc,kBAAkBZ,wBAAiB,CAClDa,UAAWnC,QACXoC,MAAOd,wBACPe,SAAU,OACVC,MAAO,SAGXvB,OAAOI,GAAGC,SAASmB,eAAejB,wBAAiB,CAC/CkB,OAAQxC,WAuFRyC,CAAqB1B,OAAQT,iBAnFR,EAACS,OAAQ2B,yBAE5BC,kBAAoB,KACH,IAAIC,kBAAW7B,QACvBG,mBAKfH,OAAOI,GAAGC,SAASC,gBAAgBwB,wBAAiB,CAChDtB,KATc,QAUdC,QAASkB,gBACTjB,SAAUkB,kBACVjB,QAASC,KACEZ,OAAOa,UAAUC,0BACpB,oHAEAF,IAAIG,WACNC,SAIVhB,OAAOI,GAAGC,SAASY,YAAYa,wBAAiB,CAC5CtB,KAtBc,QAuBdU,KAAMS,gBACNjB,SAAUkB,oBAGd5B,OAAOI,GAAGC,SAASmB,eAAeM,wBAAiB,CAC/CL,OAAQpC,UAGZW,OAAOI,GAAGC,SAASc,kBAAkBW,wBAAiB,CAClDV,UAAW/B,QACXgC,MAAOS,wBACPR,SAAU,OACVC,MAAO,UAgDPQ,CAAqB/B,OAAQR,iBA3CN,EAACQ,OAAQP,uBAAwBI,iCAEtDmC,mBAAqB,KACF,IAAIC,sBAAajC,QACzBG,mBAIjBH,OAAOI,GAAGC,SAAS6B,QAPM,cAOoBrC,wBAAwBsC,MACrEnC,OAAOI,GAAGC,SAAS+B,UAAUC,+BAAwB,CACjD7B,KATqB,cAUrBC,QAAShB,uBACTiB,SAAU,KACNsB,wBAIRhC,OAAOI,GAAGC,SAASY,YAAYoB,+BAAwB,CACnD7B,KAjBqB,cAkBrBU,KAAMzB,uBACNiB,SAAU,KACNsB,yBAuBJM,CAAuBtC,OAAQP,uBAAwBI"} \ No newline at end of file diff --git a/lib/editor/tiny/plugins/media/amd/src/commands.js b/lib/editor/tiny/plugins/media/amd/src/commands.js index 331f151803e..4a44eb2c795 100644 --- a/lib/editor/tiny/plugins/media/amd/src/commands.js +++ b/lib/editor/tiny/plugins/media/amd/src/commands.js @@ -145,9 +145,9 @@ const registerManagerCommand = (editor, mediaManagerButtonText, mediaManagerButt export const getSetup = async() => { const [ imageButtonText, - videoButtonText, + mediaButtonText, mediaManagerButtonText - ] = await getStrings(['imagebuttontitle', 'videobuttontitle', 'mediamanagerbuttontitle'].map((key) => ({key, component}))); + ] = await getStrings(['imagebuttontitle', 'mediabuttontitle', 'mediamanagerbuttontitle'].map((key) => ({key, component}))); const [ mediaManagerButtonImage, @@ -159,7 +159,7 @@ export const getSetup = async() => { // All promises must be resolved prior to returning the function. return (editor) => { registerImageCommand(editor, imageButtonText); - registerEmbedCommand(editor, videoButtonText); + registerEmbedCommand(editor, mediaButtonText); registerManagerCommand(editor, mediaManagerButtonText, mediaManagerButtonImage); }; }; diff --git a/lib/editor/tiny/plugins/media/lang/en/tiny_media.php b/lib/editor/tiny/plugins/media/lang/en/tiny_media.php index 31c3cac3ce5..0809df1c925 100644 --- a/lib/editor/tiny/plugins/media/lang/en/tiny_media.php +++ b/lib/editor/tiny/plugins/media/lang/en/tiny_media.php @@ -73,6 +73,7 @@ $string['languagesinstalled'] = 'Languages installed'; $string['link'] = 'Link'; $string['loop'] = 'Loop'; $string['managefiles'] = 'Manage files'; +$string['mediabuttontitle'] = 'Multimedia'; $string['mediamanagerbuttontitle'] = 'Media Manager'; $string['mediamanagerproperties'] = 'Media Manager'; $string['metadata_help'] = 'Metadata tracks, for use from a script, may be used only if the player supports metadata.'; @@ -84,7 +85,6 @@ $string['pluginname'] = 'Tiny Media plugin for Moodle'; $string['presentation'] = 'This image is decorative only'; $string['presentationoraltrequired'] = 'An image must have a description, unless it is marked as decorative only.'; $string['privacy:metadata'] = 'The media plugin for TinyMCE does not store any personal data.'; -$string['privacy:metadata'] = 'The media plugin for TinyMCE does not store any personal data.'; $string['remove'] = 'Remove'; $string['saveimage'] = 'Save image'; $string['size'] = 'Size'; @@ -98,6 +98,5 @@ $string['unusedfilesdesc'] = 'The following embedded files are not used in the t $string['unusedfilesheader'] = 'Unused files'; $string['unusedfilesremovalnotice'] = 'Any unused files will be automatically deleted when saving changes.'; $string['video'] = 'Video'; -$string['videobuttontitle'] = 'Video'; $string['videosourcelabel'] = 'Video source URL'; $string['width'] = 'Width';