PHP Classes

File: public/js/tinymce/src/plugins/visualchars/src/main/js/core/Data.js

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

Contents

Class file image Download
/** * Data.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.visualchars.core.Data', [ ], function () { var charMap = { '\u00a0': 'nbsp', '\u00ad': 'shy' }; var charMapToRegExp = function (charMap, global) { var key, regExp = ''; for (key in charMap) { regExp += key; } return new RegExp('[' + regExp + ']', global ? 'g' : ''); }; var charMapToSelector = function (charMap) { var key, selector = ''; for (key in charMap) { if (selector) { selector += ','; } selector += 'span.mce-' + charMap[key]; } return selector; }; return { charMap: charMap, regExp: charMapToRegExp(charMap), regExpGlobal: charMapToRegExp(charMap, true), selector: charMapToSelector(charMap), charMapToRegExp: charMapToRegExp, charMapToSelector: charMapToSelector }; } );