forked from jaymzcd/tinymce-soundcloud
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.min.js
More file actions
39 lines (35 loc) · 1.48 KB
/
Copy pathplugin.min.js
File metadata and controls
39 lines (35 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// __ _______________ _____ __________ __
// / |/ / ____/ ____/ / ___/____ __ ______ ____/ / ____/ /___ __ ______/ /
// / /|_/ / / / __/ \__ \/ __ \/ / / / __ \/ __ / / / / __ \/ / / / __ /
// / / / / /___/ /___ ___/ / /_/ / /_/ / / / / /_/ / /___/ / /_/ / /_/ / /_/ /
///_/ /_/\____/_____/ /____/\____/\__,_/_/ /_/\__,_/\____/_/\____/\__,_/\__,_/
//
// A TinyMCE plugin for embeding Soundcloud files - this is heavily influenced/based
// on the tinymce-youtube plugin by Jimmy Hills: https://github.com/hatchddigital/tinymce-youtube
// UDOX 2013 | jaymz campbell | u-dox.com
tinymce.PluginManager.requireLangPack('soundcloud', 'en_EN,de_DE,es_ES,it_IT,fr_FR');
tinymce.PluginManager.add('soundcloud', function (editor, url) {
function openmanager() {
editor.windowManager.open({
file: url + '/dialog.html?r=' + Math.random(),
width: 650,
height: 500,
inline: 1,
title: 'Aggiungi una traccia di soundcloud!'
}, {
plugin_url: url // Plugin absolute URL
});
}
editor.addButton('soundcloud', {
icon: true,
image: tinyMCE.baseURL + '/plugins/soundcloud/img/soundcloud-icon.png',
tooltip: 'Add Soundcloud track',
onclick: openmanager
});
editor.addMenuItem('soundcloud', {
icon: 'media',
text: 'Add soundcloud track',
onclick: openmanager,
context: 'insert'
});
});