PHP Classes

File: public/js/tinymce/src/plugins/emoticons/src/main/js/ui/Buttons.js

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra   GoLavaCMS   public/js/tinymce/src/plugins/emoticons/src/main/js/ui/Buttons.js   Download  
File: public/js/tinymce/src/plugins/emoticons/src/main/js/ui/Buttons.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: GoLavaCMS
Publish content on Web pages with SEO support
Author: By
Last change:
Date: 6 years ago
Size: 1,161 bytes
 

Contents

Class file image Download
/** * Buttons.js * * Released under LGPL License. * Copyright (c) 1999-2017 Ephox Corp. All rights reserved * * License: http://www.tinymce.com/license * Contributing: http://www.tinymce.com/contributing */ define( 'tinymce.plugins.emoticons.ui.Buttons', [ 'tinymce.plugins.emoticons.ui.PanelHtml' ], function (PanelHtml) { var insertEmoticon = function (editor, src, alt) { editor.insertContent(editor.dom.createHTML('img', { src: src, alt: alt })); }; var register = function (editor, pluginUrl) { var panelHtml = PanelHtml.getHtml(pluginUrl); editor.addButton('emoticons', { type: 'panelbutton', panel: { role: 'application', autohide: true, html: panelHtml, onclick: function (e) { var linkElm = editor.dom.getParent(e.target, 'a'); if (linkElm) { insertEmoticon(editor, linkElm.getAttribute('data-mce-url'), linkElm.getAttribute('data-mce-alt')); this.hide(); } } }, tooltip: 'Emoticons' }); }; return { register: register }; } );