-
-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathplugin.min.js
More file actions
executable file
·22 lines (21 loc) · 1.87 KB
/
plugin.min.js
File metadata and controls
executable file
·22 lines (21 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*!
# -- BEGIN LICENSE BLOCK ----------------------------------
#
# This file is part of tinyMCE.
# YouTube for tinyMCE
# Copyright (C) 2011 - 2026 Gerits Aurelien <aurelien[at]magix-cms[dot]com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# -- END LICENSE BLOCK -----------------------------------
*/
tinymce.PluginManager.requireLangPack("youtube");tinymce.PluginManager.add("youtube",(function(editor,url){const _=text=>editor.translate(text);editor.ui.registry.addIcon("youtube-brands",'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="#FF0000" d="M23.5 6.2c-.3-1.1-1.1-1.9-2.2-2.2C19.3 3.5 12 3.5 12 3.5s-7.3 0-9.3.5c-1.1.3-1.9 1.1-2.2 2.2C0 8.2 0 12 0 12s0 3.8.5 5.8c.3 1.1 1.1 1.9 2.2 2.2 2 1.5 9.3 1.5 9.3 1.5s7.3 0 9.3-.5c1.1-.3 1.9-1.1 2.2-2.2.5-2 .5-5.8.5-5.8s0-3.8-.5-5.8zM9.5 15.5V8.5l6.5 3.5-6.5 3.5z"/></svg>');const openYouTubeDialog=()=>{editor.windowManager.openUrl({title:_("YouTube Title"),url:url+"/youtube.html",width:800,height:620})};editor.ui.registry.addButton("youtube",{icon:"youtube-brands",tooltip:_("YouTube Tooltip"),onAction:openYouTubeDialog});editor.ui.registry.addMenuItem("youtube",{icon:"youtube-brands",text:_("YouTube Video"),onAction:openYouTubeDialog});return{getMetadata:()=>({name:"YouTube for Magix CMS",author:"Gerits Aurelien",version:"2.0.0"})}}));