2017-04-13 17:09:35 +02:00
/* global CKEDITOR */
CKEDITOR . editorConfig = function ( config ) {
2017-02-21 18:21:30 +01:00
var fixThings = false ;
// https://dev.ckeditor.com/ticket/10907
2017-02-21 18:59:42 +01:00
config . needsBrFiller = fixThings ;
config . needsNbspFiller = fixThings ;
2017-02-21 18:21:30 +01:00
2018-05-11 09:06:22 +02:00
config . removeButtons = 'Source,Maximize' ;
2017-02-21 18:21:30 +01:00
// magicline plugin inserts html crap into the document which is not part of the
// document itself and causes problems when it's sent across the wire and reflected back
2017-06-21 18:04:35 +02:00
config . removePlugins = 'resize,elementspath' ;
config . resize _enabled = false ; //bottom-bar
2019-11-22 12:20:07 +01:00
config . extraPlugins = 'autolink,colorbutton,colordialog,font,indentblock,justify,mediatag,print,blockbase64,mathjax,wordcount' ;
2020-04-16 14:59:40 -04:00
config . fontSize _sizes = '(Default)/unset;8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px' ; // XXX translation for default?
2017-06-14 15:39:33 +02:00
config . toolbarGroups = [
// {"name":"clipboard","groups":["clipboard","undo"]},
//{"name":"editing","groups":["find","selection"]},
{ "name" : "links" } ,
{ "name" : "insert" } ,
{ "name" : "forms" } ,
{ "name" : "tools" } ,
{ "name" : "document" , "groups" : [ "mode" , "document" , "doctools" ] } ,
{ "name" : "others" } ,
{ "name" : "basicstyles" , "groups" : [ "basicstyles" , "cleanup" ] } ,
{ "name" : "paragraph" , "groups" : [ "list" , "indent" , "blocks" , "align" , "bidi" ] } ,
{ "name" : "styles" } ,
2017-12-21 17:07:06 +01:00
{ "name" : "colors" } ,
{ "name" : "print" } ] ;
2017-02-21 18:21:30 +01:00
2019-04-02 14:19:41 +02:00
config . mathJaxLib = '/pad/mathjax/MathJax.js?config=TeX-AMS_HTML' ;
2017-03-24 14:55:29 +01:00
config . font _defaultLabel = 'Arial' ;
2017-04-14 18:20:08 +02:00
config . fontSize _defaultLabel = '16' ;
2017-03-24 14:55:29 +01:00
2017-04-13 16:42:26 +02:00
config . keystrokes = [
[ CKEDITOR . ALT + 121 /*F10*/ , 'toolbarFocus' ] ,
[ CKEDITOR . ALT + 122 /*F11*/ , 'elementsPathFocus' ] ,
[ CKEDITOR . SHIFT + 121 /*F10*/ , 'contextMenu' ] ,
[ CKEDITOR . CTRL + 90 /*Z*/ , 'undo' ] ,
[ CKEDITOR . CTRL + 89 /*Y*/ , 'redo' ] ,
[ CKEDITOR . CTRL + CKEDITOR . SHIFT + 90 /*Z*/ , 'redo' ] ,
[ CKEDITOR . CTRL + CKEDITOR . SHIFT + 76 /*L*/ , 'link' ] ,
[ CKEDITOR . CTRL + 76 /*L*/ , undefined ] ,
[ CKEDITOR . CTRL + 66 /*B*/ , 'bold' ] ,
[ CKEDITOR . CTRL + 73 /*I*/ , 'italic' ] ,
[ CKEDITOR . CTRL + 85 /*U*/ , 'underline' ] ,
[ CKEDITOR . ALT + 109 /*-*/ , 'toolbarCollapse' ]
] ;
2017-02-21 18:21:30 +01:00
//skin: 'moono-cryptpad,/pad/themes/moono-cryptpad/'
//skin: 'flat,/pad/themes/flat/'
2017-06-20 10:03:13 +02:00
//config.skin= 'moono-lisa,/pad/themes/moono-lisa/'
2017-02-21 18:21:30 +01:00
//skin: 'moono-dark,/pad/themes/moono-dark/'
//skin: 'office2013,/pad/themes/office2013/'
2017-02-21 18:59:42 +01:00
} ;
2017-08-22 15:50:10 +02:00
( function ( ) {
// These are overrides inside of ckeditor which add ?ver= to the CSS files so that
// every part of ckeditor will get in the browser cache.
var fix = function ( x ) {
if ( x . map ) { return x . map ( fix ) ; }
return ( /\/bower_components\/.*\.css$/ . test ( x ) ) ? ( x + '?ver=' + CKEDITOR . timestamp ) : x ;
} ;
CKEDITOR . tools . _buildStyleHtml = CKEDITOR . tools . buildStyleHtml ;
CKEDITOR . document . _appendStyleSheet = CKEDITOR . document . appendStyleSheet ;
CKEDITOR . tools . buildStyleHtml = function ( x ) { return CKEDITOR . tools . _buildStyleHtml ( fix ( x ) ) ; } ;
CKEDITOR . document . appendStyleSheet = function ( x ) { return CKEDITOR . document . _appendStyleSheet ( fix ( x ) ) ; } ;
2017-09-05 12:16:49 +02:00
} ( ) ) ;