PHP Classes

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

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra   GoLavaCMS   public/js/tinymce/src/plugins/directionality/src/main/js/ui/Buttons.js   Download  
File: public/js/tinymce/src/plugins/directionality/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: 982 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.directionality.ui.Buttons', [ 'tinymce.core.util.Tools' ], function (Tools) { var generateSelector = function (dir) { var selector = []; Tools.each('h1 h2 h3 h4 h5 h6 div p'.split(' '), function (name) { selector.push(name + '[dir=' + dir + ']'); }); return selector.join(','); }; var register = function (editor) { editor.addButton('ltr', { title: 'Left to right', cmd: 'mceDirectionLTR', stateSelector: generateSelector('ltr') }); editor.addButton('rtl', { title: 'Right to left', cmd: 'mceDirectionRTL', stateSelector: generateSelector('rtl') }); }; return { register: register }; } );