diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ar.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ar.js index 5223facd08..15b00bb299 100644 --- a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ar.js +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ar.js @@ -3,11 +3,11 @@ Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'mathjax', 'ar', { - title: 'Mathematics in TeX', // MISSING - button: 'Math', // MISSING - dialogInput: 'Write your TeX here', // MISSING + title: 'الرياصيات في Tex', + button: 'رياضيات', + dialogInput: 'أكتب Tex خاصتك هنا', docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', - docLabel: 'TeX documentation', // MISSING - loading: 'تحميل', - pathName: 'math' // MISSING + docLabel: 'وثائق Tex', + loading: 'جاري التحميل...', + pathName: 'رياضيات' } ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/da.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/da.js index d56f8f2df5..5853003b76 100644 --- a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/da.js +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/da.js @@ -5,9 +5,9 @@ For licensing, see LICENSE.md or http://ckeditor.com/license CKEDITOR.plugins.setLang( 'mathjax', 'da', { title: 'Matematik i TeX', button: 'Matematik', - dialogInput: 'Write your TeX here', // MISSING + dialogInput: 'Skriv din TeX her', docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', docLabel: 'TeX dokumentation', - loading: 'loading...', // MISSING + loading: 'henter...', pathName: 'matematik' } ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/de.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/de.js index 9a1cf64cb9..05104ba864 100644 --- a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/de.js +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/de.js @@ -7,7 +7,7 @@ CKEDITOR.plugins.setLang( 'mathjax', 'de', { button: 'Rechnung', dialogInput: 'Schreiben Sie hier in Tex', docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', - docLabel: 'Tex Dokumentation', - loading: 'lädt...', + docLabel: 'TeX-Dokumentation', + loading: 'Ladevorgang...', pathName: 'rechnen' } ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sv.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sv.js index f24b12ce25..d480d241f1 100644 --- a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sv.js +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sv.js @@ -8,6 +8,6 @@ CKEDITOR.plugins.setLang( 'mathjax', 'sv', { dialogInput: 'Skriv din TeX här', docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', docLabel: 'TeX dokumentation', - loading: 'laddar', + loading: 'laddar...', pathName: 'matte' } ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/plugin.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/plugin.js index 482a8b7fd6..8338b914d7 100644 --- a/main/inc/lib/javascript/ckeditor/plugins/mathjax/plugin.js +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/plugin.js @@ -4,17 +4,14 @@ */ /** - * @fileOverview [Mathematical Formulas](http://ckeditor.com/addon/mathjax) plugin. + * @fileOverview The [Mathematical Formulas](http://ckeditor.com/addon/mathjax) plugin that allows you to create and modify mathematical equations written in TeX directly in CKEditor.. */ 'use strict'; ( function() { - - var cdn = 'http:\/\/cdn.mathjax.org\/mathjax\/2.2-latest\/MathJax.js?config=TeX-AMS_HTML'; - CKEDITOR.plugins.add( 'mathjax', { - lang: 'af,ar,ca,cs,cy,da,de,el,en,en-gb,eo,es,fa,fi,fr,gl,he,hr,hu,it,ja,km,ku,lt,nb,nl,no,pl,pt,pt-br,ro,ru,sk,sl,sq,sv,tr,tt,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE% + lang: 'af,ar,bg,ca,cs,cy,da,de,el,en,en-gb,eo,es,eu,fa,fi,fr,gl,he,hr,hu,id,it,ja,km,ko,ku,lt,nb,nl,no,pl,pt,pt-br,ro,ru,sk,sl,sq,sv,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE% requires: 'widget,dialog', icons: 'mathjax', hidpi: true, // %REMOVE_LINE_CORE% @@ -22,6 +19,10 @@ init: function( editor ) { var cls = editor.config.mathJaxClass || 'math-tex'; + if ( !editor.config.mathJaxLib ) { + CKEDITOR.error( 'mathjax-no-config' ); + } + editor.widgets.add( 'mathjax', { inline: true, dialog: 'mathjax', @@ -127,8 +128,10 @@ // Add MathJax script to page preview. editor.on( 'contentPreview', function( evt ) { - evt.data.dataValue = evt.data.dataValue.replace( /<\/head>/, - '' + // Load MathJax lib. - '' + + '' + '' + '
' + '' + @@ -431,14 +434,20 @@ } )(); /** - * Sets the path to the MathJax library. It can be both a local - * resource and a location different than the default CDN. + * Sets the path to the MathJax library. It can be both a local resource and a location different than the default CDN. * * Please note that this must be a full or absolute path. * - * config.mathJaxLib = 'http:\/\/example.com\/libs\/MathJax.js'; + * Read more in the [documentation](#!/guide/dev_mathjax) + * and see the [SDK sample](http://sdk.ckeditor.com/samples/mathjax.html). * - * @cfg {String} [mathJaxLib='http:\/\/cdn.mathjax.org\/mathjax\/2.2-latest\/MathJax.js?config=TeX-AMS_HTML'] + * config.mathJaxLib = '//cdn.mathjax.org/mathjax/2.2-latest/MathJax.js?config=TeX-AMS_HTML'; + * + * **Note:** Since CKEditor 4.5 this option does not have a default value, so it must + * be set in order to enable the MathJax plugin. + * + * @since 4.3 + * @cfg {String} mathJaxLib * @member CKEDITOR.config */ @@ -455,6 +464,9 @@ * * \( \sqrt{4} = 2 \) * + * Read more in the [documentation](#!/guide/dev_mathjax) + * and see the [SDK sample](http://sdk.ckeditor.com/samples/mathjax.html). + * * @cfg {String} [mathJaxClass='math-tex'] * @member CKEDITOR.config */