File:  [LON-CAPA] / loncom / html / adm / ckeditor / loncapaconfig.js
Revision 1.5: download - view: text, annotated - select for diffs
Wed Jun 24 15:16:40 2015 UTC (9 years, 1 month ago) by damieng
Branches: MAIN
CVS tags: version_2_12_X, version_2_11_X, version_2_11_5, version_2_11_4_uiuc, version_2_11_4_msu, version_2_11_4, version_2_11_3_uiuc, version_2_11_3_msu, version_2_11_3, version_2_11_2_uiuc, version_2_11_2_msu, version_2_11_2_educog, version_2_11_2, HEAD
using the same special characters in ckeditor and the graphical editor

    1: /**
    2:  * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
    3:  * For licensing, see LICENSE.md or http://ckeditor.com/license
    4:  */
    5: 
    6: CKEDITOR.editorConfig = function( config ) {
    7:     // Define changes to default configuration here.
    8:     // For complete reference see:
    9:     // http://docs.ckeditor.com/#!/api/CKEDITOR.config
   10: 
   11:     // The toolbar groups arrangement, optimized for two toolbar rows.
   12:     config.toolbarGroups = [
   13:         { name: 'edits',   groups: [ 'undo' ] },
   14:         { name: 'clipboard',   groups: [ 'clipboard' ] },
   15:         { name: 'editing',     groups: [ 'find', 'selection', 'spellchecker' ] },
   16:         { name: 'links' },
   17:         { name: 'insert' },
   18:         { name: 'forms' },
   19:         { name: 'tools' },
   20:         { name: 'document',       groups: [ 'mode', 'document', 'doctools' ] },
   21:         { name: 'others' },
   22:         { name: 'about' },
   23:         '/',
   24:         { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
   25:         { name: 'paragraph',   groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
   26:         { name: 'styles' },
   27:         { name: 'colors' }
   28:     ];
   29:     
   30:     // config.disableNativeSpellChecker = false;
   31:     // to see the native spellchecker, we need to disable the contextual menu:
   32:     // config.removePlugins = 'contextmenu,tabletools'; // problem: it removes the table tools !
   33:     // see http://dev.ckeditor.com/ticket/12716
   34:     
   35:     config.removePlugins = 'sourcearea';
   36:     
   37:     // Remove some buttons provided by the standard plugins, which are
   38:     // not needed in the Standard(s) toolbar.
   39:     // config.removeButtons = 'spellchecker';
   40:     // NOTE: we might want to disable spell checking to avoid the ads (if only we could use the native spellcheckers)
   41: 
   42:     // Set the most common block elements.
   43:     config.format_tags = 'p;h1;h2;h3;pre';
   44: 
   45:     // Simplify the dialog windows.
   46:     config.removeDialogTabs = 'image:advanced;link:advanced';
   47:     
   48:     
   49:     config.allowedContent = true;
   50:     config.extraPlugins = 'lcm,chem';
   51:     
   52:     config.mathJaxLib = '/adm/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML';
   53:     
   54:     config.specialChars = [
   55:         /* upercase greek */
   56:             ["\u0393", "Gamma"], ["\u0394", "Delta"], ["\u0398", "Theta"], ["\u039B", "Lamda"],
   57:             ["\u039E", "Xi"], ["\u03A0", "Pi"], ["\u03A3", "Sigma"], ["\u03A5", "Upsilon"],
   58:             ["\u03A6", "Phi"], ["\u03A7", "Chi"], ["\u03A8", "Psi"], ["\u03A9", "Omega"],
   59:             "", "", "", "", "",
   60:         /* lowercase greek */
   61:             ["\u03B1", "alpha"], ["\u03B2", "beta"], ["\u03B3", "gamma"], ["\u03B4", "delta"],
   62:             ["\u03B5", "epsilon"], ["\u03B6", "zeta"], ["\u03B7", "eta"], ["\u03B8", "theta"],
   63:             ["\u03B9", "iota"], ["\u03BA", "kappa"], ["\u03BB", "lambda"], ["\u03BC", "mu"],
   64:             ["\u03BD", "nu"], ["\u03BE", "xi"], ["\u03BF", "omicron"], ["\u03C0", "pi"],
   65:             ["\u03C1", "rho"], ["\u03C2", "final sigma"], ["\u03C3", "sigma"],
   66:             ["\u03C4", "tau"], ["\u03C5", "upsilon"], ["\u03C6", "phi"], ["\u03C7", "chi"],
   67:             ["\u03C8", "psi"], ["\u03C9", "omega"],
   68:             "", 
   69:         /* greek symbols */
   70:             ["\u03D1", "theta symbol"], ["\u03D5", "phi symbol"], ["\u03D6", "pi symbol"],
   71:             "", "", "", "", "",
   72:         /* math letters */
   73:             ["\u2113", "script l"], ["\u2102", "double-struck C"], ["\u2115", "double-struck N"],
   74:             ["\u211A", "double-struck Q"], ["\u211D", "double-struck R"], ["\u2124", "double-struck Z"],
   75:             "", "", "", "", "", "", "", "", "", "", "",
   76:         /* math operators */
   77:             ["\u00AC", "not"], ["\u00B1", "plus-minus"], ["\u00D7", "multiplication"],
   78:             ["\u00F7", "division"], ["\u00B7", "middle dot"],
   79:             ["\u2200", "for all"], ["\u2203", "there exists"],
   80:             ["\u2202", "partial differential"], ["\u2207", "nabla"], 
   81:             ["\u2211", "n-ary summation"], ["\u221D", "proportional to"],
   82:             ["\u221E", "infinity"], ["\u2227", "logical and"], ["\u2228", "logical or"],
   83:             ["\u222B", "integral"],
   84:             ["\u223C", "tilde operator"], ["\u2248", "almost equal to"],
   85:             ["\u2245", "approximately equal to"], ["\u2260", "not equal to"],
   86:             ["\u2261", "identical to"], ["\u2264", "less-than or equal to"],
   87:             ["\u2265", "greater-than or equal to"],
   88:             ["\u226A", "much less than"], ["\u226B", "much greater than"],
   89:             ["\u27C2", "perpendicular"], ["\u2225", "parallel to"],
   90:             "", "", "", "", "", "", "", "",
   91:         /* sets */
   92:             ["\u2205", "empty set"], ["\u2208", "element of"], ["\u2209", "not an element of"],
   93:             ["\u2229", "intersection"], ["\u222A", "union"], ["\u2282", "subset of"],
   94:             "", "", "", "", "", "", "", "", "", "", "",
   95:         /* arrows */
   96:             ["\u2190", "leftwards arrow"], ["\u2192", "rightwards arrow"], ["\u2194", "left right arrow"],
   97:             ["\u21D0", "leftwards double arrow"], ["\u21D2", "rightwards double arrow"],
   98:             ["\u21D4", "left right double arrow"],
   99:             "", "", "", "", "", "", "", "", "", "", "",
  100:         /* units and other */
  101:             ["\u00B0", "degree"], ["\u212B", "Angstrom"], ["\u00A9", "copyright"], ["\u00A3", "pound"],
  102:             ["\u00A5", "yen"], ["\u20AC", "euro"], ["\u00A2", "cent"],
  103:             "", "", "", "", "", "", "", "", "", ""
  104:         /* cursive uppercase (risky to use without an explicit font) */
  105:         /*
  106:             ["\uD835\uDC9C", "script A"], ["\u212C", "script B"], ["\uD835\uDC9E", "script C"],
  107:             ["\uD835\uDC9F", "script D"], ["\u2130", "script E"], ["\u2131", "script F"],
  108:             ["\uD835\uDCA2", "script G"], ["\u210B", "script H"], ["\u2110", "script I"],
  109:             ["\uD835\uDCA5", "script J"], ["\uD835\uDCA6", "script K"], ["\u2112", "script L"],
  110:             ["\u2133", "script M"], ["\uD835\uDCA9", "script N"], ["\uD835\uDCAA", "script O"],
  111:             ["\uD835\uDCAB", "script P"], ["\uD835\uDCAC", "script Q"], ["\u211B", "script R"],
  112:             ["\uD835\uDCAE", "script S"], ["\uD835\uDCAF", "script T"], ["\uD835\uDCB0", "script U"],
  113:             ["\uD835\uDCB1", "script V"], ["\uD835\uDCB2", "script W"], ["\uD835\uDCB3", "script X"],
  114:             ["\uD835\uDCB4", "script Y"], ["\uD835\uDCB5", "script Z"]
  115:         */
  116:         ];
  117:     
  118: 
  119:     config.smiley_path = '/adm/lonIcons/';
  120:     
  121:     config.smiley_descriptions = [
  122:         'happy', 'sad', 'wink', 'big smile', 'uncertain', 'raspberry',
  123:         'embarrassed', 'cool', 'glasses', 'plain', 'surprised', 'angry',
  124:         'crying', 'quiet', 'uncertain', 'kiss', 'sick', 'heart',
  125:         'rose', 'pizza', 'ninja', 'pirate', 'agree', 
  126:         'disagree', 'angel'
  127:     ];
  128:     
  129:     config.smiley_images = [
  130:         'face-smile.png','face-sad.png','face-wink.png','face-smile-big.png','face-uncertain.png','face-raspberry.png',
  131:         'face-embarrassed.png','face-cool.png','face-glasses.png','face-plain.png','face-surprise.png','face-angry.png',
  132:         'face-crying.png','face-quiet.png','face-uncertain.png','face-kiss.png','face-sick.png','heart.png',
  133:         'rose.png','food-pizza.png','face-ninja.png', 'face-pirate.png', 'opinion-agree.png',
  134:         'opinion-disagree.png', 'face-angel.png'
  135:     ];
  136:     
  137: };

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>