]> git.immae.eu Git - perso/Immae/Projets/packagist/connexionswing-ckeditor-component.git/blame - sources/plugins/specialchar/plugin.js
Upgrade to 4.5.7 and add some plugin
[perso/Immae/Projets/packagist/connexionswing-ckeditor-component.git] / sources / plugins / specialchar / plugin.js
CommitLineData
7adcb81e 1/**\r
3b35bd27 2 * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.\r
7adcb81e
IB
3 * For licensing, see LICENSE.md or http://ckeditor.com/license\r
4 */\r
5\r
6/**\r
7 * @fileOverview Special Character plugin\r
8 */\r
9\r
10CKEDITOR.plugins.add( 'specialchar', {\r
11 // List of available localizations.\r
12 // jscs:disable\r
3b35bd27
IB
13 availableLangs: { af:1,ar:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,'de-ch':1,el:1,en:1,'en-gb':1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fr:1,'fr-ca':1,gl:1,he:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,nb:1,nl:1,no:1,pl:1,pt:1,'pt-br':1,ru:1,si:1,sk:1,sl:1,sq:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,'zh-cn':1 },\r
14 lang: 'af,ar,bg,bn,bs,ca,cs,cy,da,de,de-ch,el,en,en-au,en-ca,en-gb,eo,es,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%\r
7adcb81e
IB
15 // jscs:enable\r
16 requires: 'dialog',\r
17 icons: 'specialchar', // %REMOVE_LINE_CORE%\r
18 hidpi: true, // %REMOVE_LINE_CORE%\r
19 init: function( editor ) {\r
20 var pluginName = 'specialchar',\r
21 plugin = this;\r
22\r
23 // Register the dialog.\r
24 CKEDITOR.dialog.add( pluginName, this.path + 'dialogs/specialchar.js' );\r
25\r
26 editor.addCommand( pluginName, {\r
27 exec: function() {\r
28 var langCode = editor.langCode;\r
29 langCode =\r
30 plugin.availableLangs[ langCode ] ? langCode :\r
31 plugin.availableLangs[ langCode.replace( /-.*/, '' ) ] ? langCode.replace( /-.*/, '' ) :\r
32 'en';\r
33\r
34 CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( plugin.path + 'dialogs/lang/' + langCode + '.js' ), function() {\r
35 CKEDITOR.tools.extend( editor.lang.specialchar, plugin.langEntries[ langCode ] );\r
36 editor.openDialog( pluginName );\r
37 } );\r
38 },\r
39 modes: { wysiwyg: 1 },\r
40 canUndo: false\r
41 } );\r
42\r
43 // Register the toolbar button.\r
44 editor.ui.addButton && editor.ui.addButton( 'SpecialChar', {\r
45 label: editor.lang.specialchar.toolbar,\r
46 command: pluginName,\r
47 toolbar: 'insert,50'\r
48 } );\r
49 }\r
50} );\r
51\r
52/**\r
53 * The list of special characters visible in the "Special Character" dialog window.\r
54 *\r
55 * config.specialChars = [ '"', '’', [ '&custom;', 'Custom label' ] ];\r
56 * config.specialChars = config.specialChars.concat( [ '"', [ '’', 'Custom label' ] ] );\r
57 *\r
58 * @cfg\r
59 * @member CKEDITOR.config\r
60 */\r
61CKEDITOR.config.specialChars = [\r
62 '!', '"', '#', '$', '%', '&', "'", '(', ')', '*', '+', '-', '.', '/',\r
63 '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';',\r
64 '<', '=', '>', '?', '@',\r
65 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',\r
66 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',\r
67 '[', ']', '^', '_', '`',\r
68 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',\r
69 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',\r
70 '{', '|', '}', '~',\r
71 '€', '‘', '’', '“', '”', '–', '—', '¡', '¢', '£',\r
72 '¤', '¥', '¦', '§', '¨', '©', 'ª', '«', '¬', '®', '¯',\r
73 '°', '²', '³', '´', 'µ', '¶', '·', '¸', '¹', 'º', '»',\r
74 '¼', '½', '¾', '¿', 'À', 'Á', 'Â', 'Ã', 'Ä', 'Å',\r
75 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï',\r
76 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', '×', 'Ø', 'Ù',\r
77 'Ú', 'Û', 'Ü', 'Ý', 'Þ', 'ß', 'à', 'á', 'â', 'ã',\r
78 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í',\r
79 'î', 'ï', 'ð', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', '÷',\r
80 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'þ', 'ÿ', 'Œ', 'œ',\r
81 'Ŵ', '&#374', '&#373', 'ŷ', '‚', '‛', '„', '…', '™', '►', '•',\r
82 '→', '⇒', '⇔', '♦', '≈'\r
83];\r