PHP Classes

File: public/js/tinymce/src/themes/mobile/src/main/js/util/FormatChangers.js

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra   GoLavaCMS   public/js/tinymce/src/themes/mobile/src/main/js/util/FormatChangers.js   Download  
File: public/js/tinymce/src/themes/mobile/src/main/js/util/FormatChangers.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,084 bytes
 

Contents

Class file image Download
define( 'tinymce.themes.mobile.util.FormatChangers', [ 'ephox.katamari.api.Arr', 'ephox.katamari.api.Fun', 'ephox.katamari.api.Obj', 'tinymce.themes.mobile.channels.TinyChannels' ], function (Arr, Fun, Obj, TinyChannels) { var fontSizes = [ 'x-small', 'small', 'medium', 'large', 'x-large' ]; var fireChange = function (realm, command, state) { realm.system().broadcastOn([ TinyChannels.formatChanged() ], { command: command, state: state }); }; var init = function (realm, editor) { var allFormats = Obj.keys(editor.formatter.get()); Arr.each(allFormats, function (command) { editor.formatter.formatChanged(command, function (state) { fireChange(realm, command, state); }); }); Arr.each([ 'ul', 'ol' ], function (command) { editor.selection.selectorChanged(command, function (state, data) { fireChange(realm, command, state); }); }); }; return { init: init, fontSizes: Fun.constant(fontSizes) }; } );