Ticket #5599: 5599_5.patch

File 5599_5.patch, 13.1 KB (added by Tobiasz Cudnik, 15 years ago)
  • _source/plugins/specialchar/dialogs/specialchar.js

     
    213213                }
    214214        });
    215215
     216        function mergeChars( chars, extraChars )
     217        {
     218                if ( CKEDITOR.tools.isArray( extraChars ) )
     219                {
     220                        for ( var i = 0; i < extraChars.length; i++ )
     221                                chars[ chars.length ] = extraChars[ i ];
     222                }
     223
     224                return chars;
     225        }
     226
    216227        return {
    217228                title : lang.title,
    218229                minWidth : 430,
    219230                minHeight : 280,
    220231                buttons : [ CKEDITOR.dialog.cancelButton ],
    221232                charColumns : 17,
    222                 chars :
    223                         [
    224                                 '!','&quot;','#','$','%','&amp;',"'",'(',')','*','+','-','.','/',
    225                                 '0','1','2','3','4','5','6','7','8','9',':',';',
    226                                 '&lt;','=','&gt;','?','@',
    227                                 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O',
    228                                 'P','Q','R','S','T','U','V','W','X','Y','Z',
    229                                 '[',']','^','_','`',
    230                                 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p',
    231                                 'q','r','s','t','u','v','w','x','y','z',
    232                                 '{','|','}','~','&euro;(EURO SIGN)','&lsquo;(LEFT SINGLE QUOTATION MARK)','&rsquo;(RIGHT SINGLE QUOTATION MARK)','&ldquo;(LEFT DOUBLE QUOTATION MARK)',
    233                                 '&rdquo;(RIGHT DOUBLE QUOTATION MARK)','&ndash;(EN DASH)','&mdash;(EM DASH)','&iexcl;(INVERTED EXCLAMATION MARK)','&cent;(CENT SIGN)','&pound;(POUND SIGN)',
    234                                 '&curren;(CURRENCY SIGN)','&yen;(YEN SIGN)','&brvbar;(BROKEN BAR)','&sect;(SECTION SIGN)','&uml;(DIAERESIS)','&copy;(COPYRIGHT SIGN)','&ordf;(FEMININE ORDINAL INDICATOR)',
    235                                 '&laquo;(LEFT-POINTING DOUBLE ANGLE QUOTATION MARK)','&not;(NOT SIGN)','&reg;(REGISTERED SIGN)','&macr;(MACRON)','&deg;(DEGREE SIGN)','&plusmn;(PLUS-MINUS SIGN)','&sup2;(SUPERSCRIPT TWO)',
    236                                 '&sup3;(SUPERSCRIPT THREE)','&acute;(ACUTE ACCENT)','&micro;(MICRO SIGN)','&para;(PILCROW SIGN)','&middot;(MIDDLE DOT)','&cedil;(CEDILLA)',
    237                                 '&sup1;(SUPERSCRIPT ONE)','&ordm;(MASCULINE ORDINAL INDICATOR)','&raquo;(RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK)','&frac14;(VULGAR FRACTION ONE QUARTER)','&frac12;(VULGAR FRACTION ONE HALF)','&frac34;(VULGAR FRACTION THREE QUARTERS)',
    238                                 '&iquest;(INVERTED QUESTION MARK)','&Agrave;(LATIN CAPITAL LETTER A WITH GRAVE)','&Aacute;(LATIN CAPITAL LETTER A WITH ACUTE)','&Acirc;(LATIN CAPITAL LETTER A WITH CIRCUMFLEX)','&Atilde;(LATIN CAPITAL LETTER A WITH TILDE)','&Auml;(LATIN CAPITAL LETTER A WITH DIAERESIS)',
    239                                 '&Aring;(LATIN CAPITAL LETTER A WITH RING ABOVE)','&AElig;(LATIN CAPITAL LETTER AE)','&Ccedil;(LATIN CAPITAL LETTER C WITH CEDILLA)','&Egrave;(LATIN CAPITAL LETTER E WITH GRAVE)','&Eacute;(LATIN CAPITAL LETTER E WITH ACUTE)','&Ecirc;(LATIN CAPITAL LETTER E WITH CIRCUMFLEX)',
    240                                 '&Euml;(LATIN CAPITAL LETTER E WITH DIAERESIS)','&Igrave;(LATIN CAPITAL LETTER I WITH GRAVE)','&Iacute;(LATIN CAPITAL LETTER I WITH ACUTE)','&Icirc;(LATIN CAPITAL LETTER I WITH CIRCUMFLEX)','&Iuml;(LATIN CAPITAL LETTER I WITH DIAERESIS)','&ETH;(LATIN CAPITAL LETTER ETH)',
    241                                 '&Ntilde;(LATIN CAPITAL LETTER N WITH TILDE)','&Ograve;(LATIN CAPITAL LETTER O WITH GRAVE)','&Oacute;(LATIN CAPITAL LETTER O WITH ACUTE)','&Ocirc;(LATIN CAPITAL LETTER O WITH CIRCUMFLEX)','&Otilde;(LATIN CAPITAL LETTER O WITH TILDE)','&Ouml;(LATIN CAPITAL LETTER O WITH DIAERESIS)',
    242                                 '&times;(MULTIPLICATION SIGN)','&Oslash;(LATIN CAPITAL LETTER O WITH STROKE)','&Ugrave;(LATIN CAPITAL LETTER U WITH GRAVE)','&Uacute;(LATIN CAPITAL LETTER U WITH ACUTE)','&Ucirc;(LATIN CAPITAL LETTER U WITH CIRCUMFLEX)','&Uuml;(LATIN CAPITAL LETTER U WITH DIAERESIS)',
    243                                 '&Yacute;(LATIN CAPITAL LETTER Y WITH ACUTE)','&THORN;(LATIN CAPITAL LETTER THORN)','&szlig;(LATIN SMALL LETTER SHARP S)','&agrave;(LATIN SMALL LETTER A WITH GRAVE)','&aacute;(LATIN SMALL LETTER A WITH ACUTE)','&acirc;(LATIN SMALL LETTER A WITH CIRCUMFLEX)',
    244                                 '&atilde;(LATIN SMALL LETTER A WITH TILDE)','&auml;(LATIN SMALL LETTER A WITH DIAERESIS)','&aring;(LATIN SMALL LETTER A WITH RING ABOVE)','&aelig;(LATIN SMALL LETTER AE)','&ccedil;(LATIN SMALL LETTER C WITH CEDILLA)','&egrave;(LATIN SMALL LETTER E WITH GRAVE)',
    245                                 '&eacute;(LATIN SMALL LETTER E WITH ACUTE)','&ecirc;(LATIN SMALL LETTER E WITH CIRCUMFLEX)','&euml;(LATIN SMALL LETTER E WITH DIAERESIS)','&igrave;(LATIN SMALL LETTER I WITH GRAVE)','&iacute;(LATIN SMALL LETTER I WITH ACUTE)','&icirc;(LATIN SMALL LETTER I WITH CIRCUMFLEX)',
    246                                 '&iuml;(LATIN SMALL LETTER I WITH DIAERESIS)','&eth;(LATIN SMALL LETTER ETH)','&ntilde;(LATIN SMALL LETTER N WITH TILDE)','&ograve;(LATIN SMALL LETTER O WITH GRAVE)','&oacute;(LATIN SMALL LETTER O WITH ACUTE)','&ocirc;(LATIN SMALL LETTER O WITH CIRCUMFLEX)',
    247                                 '&otilde;(LATIN SMALL LETTER O WITH TILDE)','&ouml;(LATIN SMALL LETTER O WITH DIAERESIS)',
    248                                 '&divide;(DIVISION SIGN)','&oslash;(LATIN SMALL LETTER O WITH STROKE)',
    249                                 '&ugrave;(LATIN SMALL LETTER U WITH GRAVE)','&uacute;(LATIN SMALL LETTER U WITH ACUTE)',
    250                                 '&ucirc;(LATIN SMALL LETTER U WITH CIRCUMFLEX)','&uuml;(LATIN SMALL LETTER U WITH DIAERESIS)',
    251                                 '&uuml;(LATIN SMALL LETTER U WITH DIAERESIS)','&yacute;(LATIN SMALL LETTER Y WITH ACUTE)','&thorn;(LATIN SMALL LETTER THORN)','&yuml;(LATIN SMALL LETTER Y WITH DIAERESIS)',
    252                                 '&OElig;(LATIN CAPITAL LIGATURE OE)',
    253                                 '&oelig;(LATIN SMALL LIGATURE OE)','&#372;(LATIN CAPITAL LETTER W WITH CIRCUMFLEX)',
    254                                 '&#374(LATIN CAPITAL LETTER Y WITH CIRCUMFLEX)','&#373(LATIN SMALL LETTER W WITH CIRCUMFLEX)',
    255                                 '&#375;(LATIN SMALL LETTER Y WITH CIRCUMFLEX)','&sbquo;(SINGLE LOW-9 QUOTATION MARK)',
    256                                 '&#8219;(SINGLE HIGH-REVERSED-9 QUOTATION MARK)','&bdquo;(DOUBLE LOW-9 QUOTATION MARK)','&hellip;(HORIZONTAL ELLIPSIS)',
    257                                 '&trade;(TRADE MARK SIGN)','&#9658;(BLACK RIGHT-POINTING POINTER)','&bull;(BULLET)',
    258                                 '&rarr;(RIGHTWARDS ARROW)','&rArr;(RIGHTWARDS DOUBLE ARROW)','&hArr;(LEFT RIGHT DOUBLE ARROW)','&diams;(BLACK DIAMOND SUIT)','&asymp;(ALMOST EQUAL TO)'
    259                         ],
    260233                onLoad :  function()
    261234                {
    262235                        var columns = this.definition.charColumns,
    263                                 chars = this.definition.chars;
     236                                extraChars = editor.config.extraSpecialChars,
     237                                chars = editor.config.specialChars.concat( extraChars ? extraChars : [] );
    264238
    265239                        var charsTableLabel =  'specialchar_table_label' + CKEDITOR.tools.getNextNumber();
    266240                        var html = [ '<table role="listbox" aria-labelledby="' + charsTableLabel + '"' +
     
    281255                                        if ( ( character = chars[ i ] ) )
    282256                                        {
    283257                                                charDesc = '';
    284                                                 character = character.replace( /\((.*?)\)/, function( match, desc )
    285                                                         {
    286                                                                 charDesc = desc;
    287                                                                 return '';
    288                                                         } );
     258                                               
     259                                                if ( character instanceof Array )
     260                                                {
     261                                                        charDesc = character[ 1 ];
     262                                                        character = character[ 0 ];
     263                                                }
     264                                                else
     265                                                {
     266                                                        var _tmpName = character.replace( '&', '' ).replace( ';', '' ).replace( '#', '' );
     267                                                        if ( parseInt( _tmpName, 10 ) == _tmpName )
     268                                                                _tmpName = 'sign_' + _tmpName;
    289269
    290                                                 // Use character in case description unavailable.
    291                                                 charDesc = charDesc || character;
     270                                                        // Use character in case description unavailable.
     271                                                        charDesc = lang[ _tmpName ] || character;
     272                                                }
    292273
    293274                                                var charLabelId =  'cke_specialchar_label_' + i + '_' + CKEDITOR.tools.getNextNumber();
    294275
  • _source/plugins/specialchar/lang/en.js

     
     1
     2CKEDITOR.plugins.setLang( 'specialchar', 'en',
     3{
     4        euro: "EURO SIGN",
     5        lsquo: "LEFT SINGLE QUOTATION MARK",
     6        rsquo: "RIGHT SINGLE QUOTATION MARK",
     7        ldquo: "LEFT DOUBLE QUOTATION MARK",
     8        rdquo: "RIGHT DOUBLE QUOTATION MARK",
     9        ndash: "EN DASH",
     10        mdash: "EM DASH",
     11        iexcl: "INVERTED EXCLAMATION MARK",
     12        cent: "CENT SIGN",
     13        pound: "POUND SIGN",
     14        curren: "CURRENCY SIGN",
     15        yen: "YEN SIGN",
     16        brvbar: "BROKEN BAR",
     17        sect: "SECTION SIGN",
     18        uml: "DIAERESIS",
     19        copy: "COPYRIGHT SIGN",
     20        ordf: "FEMININE ORDINAL INDICATOR",
     21        laquo: "LEFT-POINTING DOUBLE ANGLE QUOTATION MARK",
     22        not: "NOT SIGN",
     23        reg: "REGISTERED SIGN",
     24        macr: "MACRON",
     25        deg: "DEGREE SIGN",
     26        sup2: "SUPERSCRIPT TWO",
     27        sup3: "SUPERSCRIPT THREE",
     28        acute: "ACUTE ACCENT",
     29        micro: "MICRO SIGN",
     30        para: "PILCROW SIGN",
     31        middot: "MIDDLE DOT",
     32        cedil: "CEDILLA",
     33        sup1: "SUPERSCRIPT ONE",
     34        ordm: "MASCULINE ORDINAL INDICATOR",
     35        frac14: "VULGAR FRACTION ONE QUARTER",
     36        frac12: "VULGAR FRACTION ONE HALF",
     37        frac34: "VULGAR FRACTION THREE QUARTERS",
     38        iquest: "INVERTED QUESTION MARK",
     39        agrave: "LATIN SMALL LETTER A WITH GRAVE",
     40        aacute: "LATIN SMALL LETTER A WITH ACUTE",
     41        acirc: "LATIN SMALL LETTER A WITH CIRCUMFLEX",
     42        atilde: "LATIN SMALL LETTER A WITH TILDE",
     43        auml: "LATIN SMALL LETTER A WITH DIAERESIS",
     44        aring: "LATIN SMALL LETTER A WITH RING ABOVE",
     45        aelig: "LATIN SMALL LETTER AE",
     46        ccedil: "LATIN SMALL LETTER C WITH CEDILLA",
     47        egrave: "LATIN SMALL LETTER E WITH GRAVE",
     48        eacute: "LATIN SMALL LETTER E WITH ACUTE",
     49        ecirc: "LATIN SMALL LETTER E WITH CIRCUMFLEX",
     50        euml: "LATIN SMALL LETTER E WITH DIAERESIS",
     51        igrave: "LATIN SMALL LETTER I WITH GRAVE",
     52        iacute: "LATIN SMALL LETTER I WITH ACUTE",
     53        icirc: "LATIN SMALL LETTER I WITH CIRCUMFLEX",
     54        iuml: "LATIN SMALL LETTER I WITH DIAERESIS",
     55        eth: "LATIN SMALL LETTER ETH",
     56        ntilde: "LATIN SMALL LETTER N WITH TILDE",
     57        ograve: "LATIN SMALL LETTER O WITH GRAVE",
     58        oacute: "LATIN SMALL LETTER O WITH ACUTE",
     59        ocirc: "LATIN SMALL LETTER O WITH CIRCUMFLEX",
     60        otilde: "LATIN SMALL LETTER O WITH TILDE",
     61        ouml: "LATIN SMALL LETTER O WITH DIAERESIS",
     62        times: "MULTIPLICATION SIGN",
     63        oslash: "LATIN SMALL LETTER O WITH STROKE",
     64        ugrave: "LATIN SMALL LETTER U WITH GRAVE",
     65        uacute: "LATIN SMALL LETTER U WITH ACUTE",
     66        ucirc: "LATIN SMALL LETTER U WITH CIRCUMFLEX",
     67        uuml: "LATIN SMALL LETTER U WITH DIAERESIS",
     68        yacute: "LATIN SMALL LETTER Y WITH ACUTE",
     69        thorn: "LATIN SMALL LETTER THORN",
     70        szlig: "LATIN SMALL LETTER SHARP S",
     71        divide: "DIVISION SIGN",
     72        yuml: "LATIN SMALL LETTER Y WITH DIAERESIS",
     73        oelig: "LATIN SMALL LIGATURE OE",
     74        sign_372: "LATIN CAPITAL LETTER W WITH CIRCUMFLEX",
     75        sign_374: "LATIN CAPITAL LETTER Y WITH CIRCUMFLEX",
     76        sign_373: "LATIN SMALL LETTER W WITH CIRCUMFLEX",
     77        sign_375: "LATIN SMALL LETTER Y WITH CIRCUMFLEX",
     78        sign_8219: "SINGLE HIGH-REVERSED-9 QUOTATION MARK",
     79        bdquo: "DOUBLE LOW-9 QUOTATION MARK",
     80        hellip: "HORIZONTAL ELLIPSIS",
     81        trade: "TRADE MARK SIGN",
     82        sign_9658: "BLACK RIGHT-POINTING POINTER",
     83        bull: "BULLET",
     84        rarr: "RIGHTWARDS DOUBLE ARROW",
     85        harr: "LEFT RIGHT DOUBLE ARROW",
     86        diams: "BLACK DIAMOND SUIT",
     87        asymp: "ALMOST EQUAL TO"
     88});
     89 No newline at end of file
  • _source/core/config.js

     
    327327         * @example
    328328         * config.baseFloatZIndex = 2000
    329329         */
    330         baseFloatZIndex : 10000
     330        baseFloatZIndex : 10000,
     331
     332        /**
     333         * The list of special characters visible in Special Character dialog.
     334         * @type Array
     335         * @example
     336         * config.specialChars = [ '&quot;', '&rsquo;', [ '&custom;', 'Custom label' ] ];
     337         */
     338        specialChars :
     339                [
     340                        '!','&quot;','#','$','%','&amp;',"'",'(',')','*','+','-','.','/',
     341                        '0','1','2','3','4','5','6','7','8','9',':',';',
     342                        '&lt;','=','&gt;','?','@',
     343                        'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O',
     344                        'P','Q','R','S','T','U','V','W','X','Y','Z',
     345                        '[',']','^','_','`',
     346                        'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p',
     347                        'q','r','s','t','u','v','w','x','y','z',
     348                        '{','|','}','~',
     349                        "&euro;", "&lsquo;", "&rsquo;", "&ldquo;", "&rdquo;", "&ndash;", "&mdash;", "&iexcl;", "&cent;", "&pound;", "&curren;", "&yen;", "&brvbar;", "&sect;", "&uml;", "&copy;", "&ordf;", "&laquo;", "&not;", "&reg;", "&macr;", "&deg;", "&", "&sup2;", "&sup3;", "&acute;", "&micro;", "&para;", "&middot;", "&cedil;", "&sup1;", "&ordm;", "&", "&frac14;", "&frac12;", "&frac34;", "&iquest;", "&Agrave;", "&Aacute;", "&Acirc;", "&Atilde;", "&Auml;", "&Aring;", "&AElig;", "&Ccedil;", "&Egrave;", "&Eacute;", "&Ecirc;", "&Euml;", "&Igrave;", "&Iacute;", "&Icirc;", "&Iuml;", "&ETH;", "&Ntilde;", "&Ograve;", "&Oacute;", "&Ocirc;", "&Otilde;", "&Ouml;", "&times;", "&Oslash;", "&Ugrave;", "&Uacute;", "&Ucirc;", "&Uuml;", "&Yacute;", "&THORN;", "&szlig;", "&agrave;", "&aacute;", "&acirc;", "&atilde;", "&auml;", "&aring;", "&aelig;", "&ccedil;", "&egrave;", "&eacute;", "&ecirc;", "&euml;", "&igrave;", "&iacute;", "&icirc;", "&iuml;", "&eth;", "&ntilde;", "&ograve;", "&oacute;", "&ocirc;", "&otilde;", "&ouml;", "&divide;", "&oslash;", "&ugrave;", "&uacute;", "&ucirc;", "&uuml;", "&uuml;", "&yacute;", "&thorn;", "&yuml;", "&OElig;", "&oelig;", "&#372;", "&#374", "&#373", "&#375;", "&", "&#8219;", "&bdquo;", "&hellip;", "&trade;", "&#9658;", "&bull;", "&rarr;", "&rArr;", "&hArr;", "&diams;", "&asymp;"
     350                ],
     351
     352//      extraSpecialChars : null
     353        /**
     354         * List of additional special characters. This is a tool setting which
     355         * makes it easier to add new characters, whithout having to touch and
     356         * possibly breaking the {@link CKEDITOR.config.specialChars} array.
     357         * @type Array
     358         * @example
     359         * config.extraSpecialChars = [ '&quot;', '&rsquo;', [ '&custom;', 'Custom label' ] ];
     360         */
     361        extraSpecialChars : null
    331362};
    332363
    333364// PACKAGER_RENAME( CKEDITOR.config )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy