PHP Classes

File: public/js/tinymce/src/core/src/main/js/fmt/ToggleFormat.js

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra   GoLavaCMS   public/js/tinymce/src/core/src/main/js/fmt/ToggleFormat.js   Download  
File: public/js/tinymce/src/core/src/main/js/fmt/ToggleFormat.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: 829 bytes
 

Contents

Class file image Download
/** * ToggleFormat.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.core.fmt.ToggleFormat', [ 'tinymce.core.fmt.ApplyFormat', 'tinymce.core.fmt.MatchFormat', 'tinymce.core.fmt.RemoveFormat' ], function (ApplyFormat, MatchFormat, RemoveFormat) { var toggle = function (editor, formats, name, vars, node) { var fmt = formats.get(name); if (MatchFormat.match(editor, name, vars, node) && (!('toggle' in fmt[0]) || fmt[0].toggle)) { RemoveFormat.remove(editor, name, vars, node); } else { ApplyFormat.applyFormat(editor, name, vars, node); } }; return { toggle: toggle }; } );