Refactoring
BIN
web/bower_components/tinymce/plugins/emoticons/img/smiley-cool.gif
vendored
Normal file
|
After Width: | Height: | Size: 354 B |
BIN
web/bower_components/tinymce/plugins/emoticons/img/smiley-cry.gif
vendored
Normal file
|
After Width: | Height: | Size: 329 B |
BIN
web/bower_components/tinymce/plugins/emoticons/img/smiley-embarassed.gif
vendored
Normal file
|
After Width: | Height: | Size: 331 B |
BIN
web/bower_components/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif
vendored
Normal file
|
After Width: | Height: | Size: 342 B |
BIN
web/bower_components/tinymce/plugins/emoticons/img/smiley-frown.gif
vendored
Normal file
|
After Width: | Height: | Size: 340 B |
BIN
web/bower_components/tinymce/plugins/emoticons/img/smiley-innocent.gif
vendored
Normal file
|
After Width: | Height: | Size: 336 B |
BIN
web/bower_components/tinymce/plugins/emoticons/img/smiley-kiss.gif
vendored
Normal file
|
After Width: | Height: | Size: 338 B |
BIN
web/bower_components/tinymce/plugins/emoticons/img/smiley-laughing.gif
vendored
Normal file
|
After Width: | Height: | Size: 343 B |
BIN
web/bower_components/tinymce/plugins/emoticons/img/smiley-money-mouth.gif
vendored
Normal file
|
After Width: | Height: | Size: 321 B |
BIN
web/bower_components/tinymce/plugins/emoticons/img/smiley-sealed.gif
vendored
Normal file
|
After Width: | Height: | Size: 323 B |
BIN
web/bower_components/tinymce/plugins/emoticons/img/smiley-smile.gif
vendored
Normal file
|
After Width: | Height: | Size: 344 B |
BIN
web/bower_components/tinymce/plugins/emoticons/img/smiley-surprised.gif
vendored
Normal file
|
After Width: | Height: | Size: 338 B |
BIN
web/bower_components/tinymce/plugins/emoticons/img/smiley-tongue-out.gif
vendored
Normal file
|
After Width: | Height: | Size: 328 B |
BIN
web/bower_components/tinymce/plugins/emoticons/img/smiley-undecided.gif
vendored
Normal file
|
After Width: | Height: | Size: 337 B |
BIN
web/bower_components/tinymce/plugins/emoticons/img/smiley-wink.gif
vendored
Normal file
|
After Width: | Height: | Size: 350 B |
BIN
web/bower_components/tinymce/plugins/emoticons/img/smiley-yell.gif
vendored
Normal file
|
After Width: | Height: | Size: 336 B |
7
web/bower_components/tinymce/plugins/emoticons/index.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Exports the "emoticons" plugin for usage with module loaders
|
||||
// Usage:
|
||||
// CommonJS:
|
||||
// require('tinymce/plugins/emoticons')
|
||||
// ES2015:
|
||||
// import 'tinymce/plugins/emoticons'
|
||||
require('./plugin.js');
|
||||
65
web/bower_components/tinymce/plugins/emoticons/plugin.js
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* plugin.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
/*global tinymce:true */
|
||||
|
||||
tinymce.PluginManager.add('emoticons', function(editor, url) {
|
||||
var emoticons = [
|
||||
["cool", "cry", "embarassed", "foot-in-mouth"],
|
||||
["frown", "innocent", "kiss", "laughing"],
|
||||
["money-mouth", "sealed", "smile", "surprised"],
|
||||
["tongue-out", "undecided", "wink", "yell"]
|
||||
];
|
||||
|
||||
function getHtml() {
|
||||
var emoticonsHtml;
|
||||
|
||||
emoticonsHtml = '<table role="list" class="mce-grid">';
|
||||
|
||||
tinymce.each(emoticons, function(row) {
|
||||
emoticonsHtml += '<tr>';
|
||||
|
||||
tinymce.each(row, function(icon) {
|
||||
var emoticonUrl = url + '/img/smiley-' + icon + '.gif';
|
||||
|
||||
emoticonsHtml += '<td><a href="#" data-mce-url="' + emoticonUrl + '" data-mce-alt="' + icon + '" tabindex="-1" ' +
|
||||
'role="option" aria-label="' + icon + '"><img src="' +
|
||||
emoticonUrl + '" style="width: 18px; height: 18px" role="presentation" /></a></td>';
|
||||
});
|
||||
|
||||
emoticonsHtml += '</tr>';
|
||||
});
|
||||
|
||||
emoticonsHtml += '</table>';
|
||||
|
||||
return emoticonsHtml;
|
||||
}
|
||||
|
||||
editor.addButton('emoticons', {
|
||||
type: 'panelbutton',
|
||||
panel: {
|
||||
role: 'application',
|
||||
autohide: true,
|
||||
html: getHtml,
|
||||
onclick: function(e) {
|
||||
var linkElm = editor.dom.getParent(e.target, 'a');
|
||||
|
||||
if (linkElm) {
|
||||
editor.insertContent(
|
||||
'<img src="' + linkElm.getAttribute('data-mce-url') + '" alt="' + linkElm.getAttribute('data-mce-alt') + '" />'
|
||||
);
|
||||
|
||||
this.hide();
|
||||
}
|
||||
}
|
||||
},
|
||||
tooltip: 'Emoticons'
|
||||
});
|
||||
});
|
||||
1
web/bower_components/tinymce/plugins/emoticons/plugin.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
tinymce.PluginManager.add("emoticons",function(e,t){function n(){var e;return e='<table role="list" class="mce-grid">',tinymce.each(r,function(n){e+="<tr>",tinymce.each(n,function(n){var r=t+"/img/smiley-"+n+".gif";e+='<td><a href="#" data-mce-url="'+r+'" data-mce-alt="'+n+'" tabindex="-1" role="option" aria-label="'+n+'"><img src="'+r+'" style="width: 18px; height: 18px" role="presentation" /></a></td>'}),e+="</tr>"}),e+="</table>"}var r=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]];e.addButton("emoticons",{type:"panelbutton",panel:{role:"application",autohide:!0,html:n,onclick:function(t){var n=e.dom.getParent(t.target,"a");n&&(e.insertContent('<img src="'+n.getAttribute("data-mce-url")+'" alt="'+n.getAttribute("data-mce-alt")+'" />'),this.hide())}},tooltip:"Emoticons"})});
|
||||