init
BIN
public/tinymce/plugins/emoticons/img/smiley-cool.gif
Normal file
|
After Width: | Height: | Size: 354 B |
BIN
public/tinymce/plugins/emoticons/img/smiley-cry.gif
Normal file
|
After Width: | Height: | Size: 329 B |
BIN
public/tinymce/plugins/emoticons/img/smiley-embarassed.gif
Normal file
|
After Width: | Height: | Size: 331 B |
BIN
public/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif
Normal file
|
After Width: | Height: | Size: 342 B |
BIN
public/tinymce/plugins/emoticons/img/smiley-frown.gif
Normal file
|
After Width: | Height: | Size: 340 B |
BIN
public/tinymce/plugins/emoticons/img/smiley-innocent.gif
Normal file
|
After Width: | Height: | Size: 336 B |
BIN
public/tinymce/plugins/emoticons/img/smiley-kiss.gif
Normal file
|
After Width: | Height: | Size: 338 B |
BIN
public/tinymce/plugins/emoticons/img/smiley-laughing.gif
Normal file
|
After Width: | Height: | Size: 343 B |
BIN
public/tinymce/plugins/emoticons/img/smiley-money-mouth.gif
Normal file
|
After Width: | Height: | Size: 321 B |
BIN
public/tinymce/plugins/emoticons/img/smiley-sealed.gif
Normal file
|
After Width: | Height: | Size: 323 B |
BIN
public/tinymce/plugins/emoticons/img/smiley-smile.gif
Normal file
|
After Width: | Height: | Size: 344 B |
BIN
public/tinymce/plugins/emoticons/img/smiley-surprised.gif
Normal file
|
After Width: | Height: | Size: 338 B |
BIN
public/tinymce/plugins/emoticons/img/smiley-tongue-out.gif
Normal file
|
After Width: | Height: | Size: 328 B |
BIN
public/tinymce/plugins/emoticons/img/smiley-undecided.gif
Normal file
|
After Width: | Height: | Size: 337 B |
BIN
public/tinymce/plugins/emoticons/img/smiley-wink.gif
Normal file
|
After Width: | Height: | Size: 350 B |
BIN
public/tinymce/plugins/emoticons/img/smiley-yell.gif
Normal file
|
After Width: | Height: | Size: 336 B |
60
public/tinymce/plugins/emoticons/plugin.js
Normal file
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* plugin.js
|
||||
*
|
||||
* Copyright, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* 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="presentation" 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 + '" tabindex="-1"><img src="' +
|
||||
emoticonUrl + '" style="width: 18px; height: 18px"></a></td>';
|
||||
});
|
||||
|
||||
emoticonsHtml += '</tr>';
|
||||
});
|
||||
|
||||
emoticonsHtml += '</table>';
|
||||
|
||||
return emoticonsHtml;
|
||||
}
|
||||
|
||||
editor.addButton('emoticons', {
|
||||
type: 'panelbutton',
|
||||
panel: {
|
||||
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') + '" />');
|
||||
this.hide();
|
||||
}
|
||||
}
|
||||
},
|
||||
tooltip: 'Emoticons'
|
||||
});
|
||||
});
|
||||
1
public/tinymce/plugins/emoticons/plugin.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
tinymce.PluginManager.add("emoticons",function(t,e){function n(){var t;return t='<table role="presentation" class="mce-grid">',tinymce.each(i,function(n){t+="<tr>",tinymce.each(n,function(n){var i=e+"/img/smiley-"+n+".gif";t+='<td><a href="#" data-mce-url="'+i+'" tabindex="-1"><img src="'+i+'" style="width: 18px; height: 18px"></a></td>'}),t+="</tr>"}),t+="</table>"}var i=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]];t.addButton("emoticons",{type:"panelbutton",panel:{autohide:!0,html:n,onclick:function(e){var n=t.dom.getParent(e.target,"a");n&&(t.insertContent('<img src="'+n.getAttribute("data-mce-url")+'" />'),this.hide())}},tooltip:"Emoticons"})});
|
||||