upgrade
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
CKEDITOR.dialog.add( 'mathjax', function( editor ) {
|
||||
|
||||
var preview,
|
||||
lang = editor.lang.mathjax;
|
||||
|
||||
return {
|
||||
title: lang.title,
|
||||
minWidth: 350,
|
||||
minHeight: 100,
|
||||
contents: [
|
||||
{
|
||||
id: 'info',
|
||||
elements: [
|
||||
{
|
||||
id: 'equation',
|
||||
type: 'textarea',
|
||||
label: lang.dialogInput,
|
||||
|
||||
onLoad: function() {
|
||||
var that = this;
|
||||
|
||||
if ( !( CKEDITOR.env.ie && CKEDITOR.env.version == 8 ) ) {
|
||||
this.getInputElement().on( 'keyup', function() {
|
||||
// Add \( and \) for preview.
|
||||
preview.setValue( '\\(' + that.getInputElement().getValue() + '\\)' );
|
||||
} );
|
||||
}
|
||||
},
|
||||
|
||||
setup: function( widget ) {
|
||||
// Remove \( and \).
|
||||
this.setValue( CKEDITOR.plugins.mathjax.trim( widget.data.math ) );
|
||||
},
|
||||
|
||||
commit: function( widget ) {
|
||||
// Add \( and \) to make TeX be parsed by MathJax by default.
|
||||
widget.setData( 'math', '\\(' + this.getValue() + '\\)' );
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'documentation',
|
||||
type: 'html',
|
||||
html:
|
||||
'<div style="width:100%;text-align:right;margin:-8px 0 10px">' +
|
||||
'<a class="cke_mathjax_doc" href="' + lang.docUrl + '" target="_black" style="cursor:pointer;color:#00B2CE;text-decoration:underline">' +
|
||||
lang.docLabel +
|
||||
'</a>' +
|
||||
'</div>'
|
||||
},
|
||||
( !( CKEDITOR.env.ie && CKEDITOR.env.version == 8 ) ) && {
|
||||
id: 'preview',
|
||||
type: 'html',
|
||||
html:
|
||||
'<div style="width:100%;text-align:center;">' +
|
||||
'<iframe style="border:0;width:0;height:0;font-size:20px" scrolling="no" frameborder="0" allowTransparency="true" src="' + CKEDITOR.plugins.mathjax.fixSrc + '"></iframe>' +
|
||||
'</div>',
|
||||
|
||||
onLoad: function() {
|
||||
var iFrame = CKEDITOR.document.getById( this.domId ).getChild( 0 );
|
||||
preview = new CKEDITOR.plugins.mathjax.frameWrapper( iFrame, editor );
|
||||
},
|
||||
|
||||
setup: function( widget ) {
|
||||
preview.setValue( widget.data.math );
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
} );
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 703 B |
Binary file not shown.
|
After Width: | Height: | Size: 784 B |
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/af.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/af.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'af', {
|
||||
title: 'Wiskunde in TeX',
|
||||
button: 'Wiskunde',
|
||||
dialogInput: 'Skryf you Tex hier',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'TeX dokument',
|
||||
loading: 'laai...',
|
||||
pathName: 'wiskunde'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ar.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ar.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'ar', {
|
||||
title: 'الرياصيات في Tex',
|
||||
button: 'رياضيات',
|
||||
dialogInput: 'أكتب Tex خاصتك هنا',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'وثائق Tex',
|
||||
loading: 'جاري التحميل...',
|
||||
pathName: 'رياضيات'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/bg.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/bg.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'bg', {
|
||||
title: 'Формули в TeX формат',
|
||||
button: 'Формули',
|
||||
dialogInput: 'Въведете вашите данни с TeX форматиране тук',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'TeX документация',
|
||||
loading: 'зареждане...',
|
||||
pathName: 'формули'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ca.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ca.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'ca', {
|
||||
title: 'Matemàtiques a TeX',
|
||||
button: 'Matemàtiques',
|
||||
dialogInput: 'Escriu el TeX aquí',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'Documentació TeX',
|
||||
loading: 'carregant...',
|
||||
pathName: 'matemàtiques'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/cs.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/cs.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'cs', {
|
||||
title: 'Matematika v TeXu',
|
||||
button: 'Matematika',
|
||||
dialogInput: 'Zde napište TeXový kód',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'Dokumentace k TeXu',
|
||||
loading: 'Nahrává se...',
|
||||
pathName: 'Matematika'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/cy.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/cy.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'cy', {
|
||||
title: 'Mathemateg mewn TeX',
|
||||
button: 'Math',
|
||||
dialogInput: 'Ysgrifennwch eich TeX yma',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'Dogfennaeth TeX',
|
||||
loading: 'llwytho...',
|
||||
pathName: 'math'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/da.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/da.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'da', {
|
||||
title: 'Matematik i TeX',
|
||||
button: 'Matematik',
|
||||
dialogInput: 'Skriv din TeX her',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'TeX dokumentation',
|
||||
loading: 'henter...',
|
||||
pathName: 'matematik'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/de.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/de.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'de', {
|
||||
title: 'Mathematik in Tex',
|
||||
button: 'Rechnung',
|
||||
dialogInput: 'Schreiben Sie hier in Tex',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'TeX-Dokumentation',
|
||||
loading: 'Ladevorgang...',
|
||||
pathName: 'rechnen'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/el.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/el.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'el', {
|
||||
title: 'Μαθηματικά με τη γλώσσα TeX',
|
||||
button: 'Μαθηματικά',
|
||||
dialogInput: 'Γράψτε κώδικα TeX εδώ',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'Τεκμηρίωση TeX',
|
||||
loading: 'γίνεται φόρτωση…',
|
||||
pathName: 'μαθηματικά'
|
||||
} );
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'en-gb', {
|
||||
title: 'Mathematics in TeX',
|
||||
button: 'Math',
|
||||
dialogInput: 'Write you TeX here',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'TeX documentation',
|
||||
loading: 'loading...',
|
||||
pathName: 'math'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/en.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/en.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'en', {
|
||||
title: 'Mathematics in TeX',
|
||||
button: 'Math',
|
||||
dialogInput: 'Write your TeX here',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'TeX documentation',
|
||||
loading: 'loading...',
|
||||
pathName: 'math'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/eo.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/eo.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'eo', {
|
||||
title: 'Matematiko en TeX',
|
||||
button: 'Matematiko',
|
||||
dialogInput: 'Skribu vian TeX tien',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'TeX dokumentado',
|
||||
loading: 'estas ŝarganta',
|
||||
pathName: 'matematiko'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/es.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/es.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'es', {
|
||||
title: 'Matemáticas en TeX',
|
||||
button: 'Matemáticas',
|
||||
dialogInput: 'Escribe tu TeX aquí',
|
||||
docUrl: 'http://es.wikipedia.org/wiki/TeX',
|
||||
docLabel: 'Documentación de TeX',
|
||||
loading: 'cargando...',
|
||||
pathName: 'matemáticas'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/eu.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/eu.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'eu', {
|
||||
title: 'Matematikak TeX-en',
|
||||
button: 'Matematika',
|
||||
dialogInput: 'Idatzi zure TeX hemen',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'TeX dokumentazioa',
|
||||
loading: 'kargatzen...',
|
||||
pathName: 'matematika'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/fa.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/fa.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'fa', {
|
||||
title: 'ریاضیات در تک',
|
||||
button: 'ریاضی',
|
||||
dialogInput: 'فرمول خود را اینجا بنویسید',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'مستندسازی فرمول نویسی',
|
||||
loading: 'بارگیری',
|
||||
pathName: 'ریاضی'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/fi.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/fi.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'fi', {
|
||||
title: 'Matematiikkaa TeX:llä',
|
||||
button: 'Matematiikka',
|
||||
dialogInput: 'Kirjoita TeX:iä tähän',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'TeX dokumentaatio',
|
||||
loading: 'lataa...',
|
||||
pathName: 'matematiikka'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/fr.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/fr.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'fr', {
|
||||
title: 'Formules mathématiques en TeX',
|
||||
button: 'Maths',
|
||||
dialogInput: 'Saisir la formule TeX ici',
|
||||
docUrl: 'http://fr.wikibooks.org/wiki/LaTeX/Math%C3%A9matiques',
|
||||
docLabel: 'Documentation de TeX',
|
||||
loading: 'chargement...',
|
||||
pathName: 'maths'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/gl.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/gl.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'gl', {
|
||||
title: 'Matemáticas en TeX',
|
||||
button: 'Matemáticas',
|
||||
dialogInput: 'Escriba o seu TeX aquí',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'Documentación de TeX',
|
||||
loading: 'cargando...',
|
||||
pathName: 'matemáticas'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/he.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/he.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'he', {
|
||||
title: 'מתמטיקה בTeX',
|
||||
button: 'מתמטיקה',
|
||||
dialogInput: 'כתוב את הTeX שלך כאן',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'תיעוד TeX',
|
||||
loading: 'טוען...',
|
||||
pathName: 'מתמטיקה'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/hr.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/hr.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'hr', {
|
||||
title: 'Matematika u TeXu',
|
||||
button: 'Matematika',
|
||||
dialogInput: 'Napiši svoj TeX ovdje',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'TeX dokumentacija',
|
||||
loading: 'učitavanje...',
|
||||
pathName: 'matematika'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/hu.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/hu.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'hu', {
|
||||
title: 'Matematika a TeX-ben',
|
||||
button: 'Matek',
|
||||
dialogInput: 'Írd a TeX-ed ide',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'TeX dokumentáció',
|
||||
loading: 'töltés...',
|
||||
pathName: 'matek'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/id.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/id.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'id', {
|
||||
title: 'Mathematics in TeX', // MISSING
|
||||
button: 'Matematika',
|
||||
dialogInput: 'Tulis Tex anda disini',
|
||||
docUrl: 'http:// MISSING //en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'TeX documentation', // MISSING
|
||||
loading: 'memuat...',
|
||||
pathName: 'math' // MISSING
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/it.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/it.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'it', {
|
||||
title: 'Formule in TeX',
|
||||
button: 'Formule',
|
||||
dialogInput: 'Scrivere qui il proprio TeX',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'Documentazione TeX',
|
||||
loading: 'caricamento…',
|
||||
pathName: 'formula'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ja.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ja.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'ja', {
|
||||
title: 'TeX形式の数式',
|
||||
button: '数式',
|
||||
dialogInput: 'TeX形式の数式を入力してください',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'TeXの解説',
|
||||
loading: '読み込み中…',
|
||||
pathName: 'math'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/km.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/km.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'km', {
|
||||
title: 'គណិតវិទ្យាក្នុង TeX',
|
||||
button: 'គណិត',
|
||||
dialogInput: 'សរសេរ TeX របស់អ្នកនៅទីនេះ',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'ឯកសារអត្ថបទពី TeX',
|
||||
loading: 'កំពុងផ្ទុក..',
|
||||
pathName: 'គណិត'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ko.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ko.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'ko', {
|
||||
title: 'TeX 문법 수식',
|
||||
button: '수식',
|
||||
dialogInput: '여기 TeX 를 입력하세요',
|
||||
docUrl: 'http://ko.wikipedia.org/wiki/%EC%9C%84%ED%82%A4%EB%B0%B1%EA%B3%BC:TeX_%EB%AC%B8%EB%B2%95',
|
||||
docLabel: 'TeX 문서',
|
||||
loading: '불러오는 중...',
|
||||
pathName: '수식'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ku.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ku.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'ku', {
|
||||
title: 'بیرکاری لە TeX',
|
||||
button: 'بیرکاری',
|
||||
dialogInput: 'TeXەکەت لێرە بنووسە',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'بەڵگەنامەکردنی TeX',
|
||||
loading: 'بارکردن...',
|
||||
pathName: 'بیرکاری'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/lt.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/lt.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'lt', {
|
||||
title: 'Matematika per TeX',
|
||||
button: 'Matematika',
|
||||
dialogInput: 'Parašyk savo TeX čia',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'TeX žinynas',
|
||||
loading: 'kraunasi...',
|
||||
pathName: 'matematika'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/nb.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/nb.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'nb', {
|
||||
title: 'Matematikk i TeX',
|
||||
button: 'Matematikk',
|
||||
dialogInput: 'Skriv TeX-koden her',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'TeX-dokumentasjon',
|
||||
loading: 'laster...',
|
||||
pathName: 'matematikk'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/nl.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/nl.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'nl', {
|
||||
title: 'Wiskunde in TeX',
|
||||
button: 'Wiskunde',
|
||||
dialogInput: 'Typ hier uw TeX',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'TeX documentatie',
|
||||
loading: 'laden...',
|
||||
pathName: 'wiskunde'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/no.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/no.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'no', {
|
||||
title: 'Matematikk i TeX',
|
||||
button: 'Matte',
|
||||
dialogInput: 'Skriv TeX-koden her',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'TeX-dokumentasjon',
|
||||
loading: 'laster...',
|
||||
pathName: 'matte'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/pl.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/pl.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'pl', {
|
||||
title: 'Wzory matematyczne w TeX',
|
||||
button: 'Wzory matematyczne',
|
||||
dialogInput: 'Wpisz wyrażenie w TeX',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'Dokumentacja TeX',
|
||||
loading: 'ładowanie...',
|
||||
pathName: 'matematyka'
|
||||
} );
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'pt-br', {
|
||||
title: 'Matemática em TeX',
|
||||
button: 'Matemática',
|
||||
dialogInput: 'Escreva seu TeX aqui',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'Documentação TeX',
|
||||
loading: 'carregando...',
|
||||
pathName: 'Matemática'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/pt.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/pt.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'pt', {
|
||||
title: 'Matemática em TeX',
|
||||
button: 'Matemática',
|
||||
dialogInput: 'Escreva aqui o seu TeX',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'Documentação TeX',
|
||||
loading: 'a carregar ...',
|
||||
pathName: 'matemática'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ro.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ro.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'ro', {
|
||||
title: 'Matematici in TeX',
|
||||
button: 'Matematici',
|
||||
dialogInput: 'Scrie TeX-ul aici',
|
||||
docUrl: 'http://ro.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'Documentatie TeX',
|
||||
loading: 'încarcă...',
|
||||
pathName: 'matematici'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ru.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ru.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'ru', {
|
||||
title: 'Математика в TeX-системе',
|
||||
button: 'Математика',
|
||||
dialogInput: 'Введите здесь TeX',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'TeX документация',
|
||||
loading: 'загрузка...',
|
||||
pathName: 'мат.'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sk.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sk.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'sk', {
|
||||
title: 'Matematika v TeX-u',
|
||||
button: 'Matematika',
|
||||
dialogInput: 'Napíšte svoj TeX sem',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'Dokumentácia TeX',
|
||||
loading: 'načítavanie...',
|
||||
pathName: 'matematika'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sl.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sl.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'sl', {
|
||||
title: 'Matematika v TeX',
|
||||
button: 'Matematika',
|
||||
dialogInput: 'Napišite svoj TeX tukaj',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'TeX dokumentacija',
|
||||
loading: 'nalaganje...',
|
||||
pathName: 'matematika'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sq.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sq.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'sq', {
|
||||
title: 'Matematikë në TeX',
|
||||
button: 'Matematikë',
|
||||
dialogInput: 'Shkruani TeX-in tuaj këtu',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'Tex dokumentimi',
|
||||
loading: 'duke u hapur...',
|
||||
pathName: 'matematikë'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sv.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sv.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'sv', {
|
||||
title: 'Mattematik i TeX',
|
||||
button: 'Matte',
|
||||
dialogInput: 'Skriv din TeX här',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'TeX dokumentation',
|
||||
loading: 'laddar...',
|
||||
pathName: 'matte'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/tr.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/tr.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'tr', {
|
||||
title: 'TeX ile Matematik',
|
||||
button: 'Matematik',
|
||||
dialogInput: 'TeX kodunuzu buraya yazın',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'TeX yardım dökümanı',
|
||||
loading: 'yükleniyor...',
|
||||
pathName: 'matematik'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/tt.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/tt.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'tt', {
|
||||
title: 'TeX\'та математика',
|
||||
button: 'Математика',
|
||||
dialogInput: 'Биредә TeX форматында аңлатмагызны языгыз',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'TeX турыдна документлар',
|
||||
loading: 'йөкләнә...',
|
||||
pathName: 'математика'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ug.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ug.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'ug', {
|
||||
title: 'TeX شەكلىدىكى ماتېماتىكا فورمۇلا تەھرىرلىگۈچ',
|
||||
button: 'ماتېماتىكا فورمۇلا',
|
||||
dialogInput: 'بۇ جايغا TeX ڭىزنى يېزىڭ',
|
||||
docUrl: 'http:// MISSING //en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'TeX documentation', // MISSING
|
||||
loading: 'loading...', // MISSING
|
||||
pathName: 'math' // MISSING
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/uk.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/uk.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'uk', {
|
||||
title: 'Математика у TeX',
|
||||
button: 'Математика',
|
||||
dialogInput: 'Наберіть тут на TeX\'у',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'Документація про TeX',
|
||||
loading: 'завантажується…',
|
||||
pathName: 'математика'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/vi.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/vi.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'vi', {
|
||||
title: 'Toán học bằng TeX',
|
||||
button: 'Toán',
|
||||
dialogInput: 'Nhập mã TeX ở đây',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'Tài liệu TeX',
|
||||
loading: 'đang nạp...',
|
||||
pathName: 'toán'
|
||||
} );
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'zh-cn', {
|
||||
title: 'TeX 语法的数学公式编辑器',
|
||||
button: '数学公式',
|
||||
dialogInput: '在此编写您的 TeX 指令',
|
||||
docUrl: 'http://zh.wikipedia.org/wiki/TeX',
|
||||
docLabel: 'TeX 语法(可以参考维基百科自身关于数学公式显示方式的帮助)',
|
||||
loading: '正在加载...',
|
||||
pathName: '数字公式'
|
||||
} );
|
||||
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/zh.js
Normal file
13
main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/zh.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'mathjax', 'zh', {
|
||||
title: '以 TeX 表示數學',
|
||||
button: '數學',
|
||||
dialogInput: '請輸入 TeX',
|
||||
docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics',
|
||||
docLabel: 'TeX 說明文件',
|
||||
loading: '載入中…',
|
||||
pathName: '數學'
|
||||
} );
|
||||
472
main/inc/lib/javascript/ckeditor/plugins/mathjax/plugin.js
Normal file
472
main/inc/lib/javascript/ckeditor/plugins/mathjax/plugin.js
Normal file
@@ -0,0 +1,472 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @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() {
|
||||
CKEDITOR.plugins.add( 'mathjax', {
|
||||
lang: 'af,ar,az,bg,ca,cs,cy,da,de,de-ch,el,en,en-gb,eo,es,eu,fa,fi,fr,gl,he,hr,hu,id,it,ja,km,ko,ku,lt,nb,nl,no,oc,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%
|
||||
|
||||
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',
|
||||
button: editor.lang.mathjax.button,
|
||||
mask: true,
|
||||
allowedContent: 'span(!' + cls + ')',
|
||||
// Allow style classes only on spans having mathjax class.
|
||||
styleToAllowedContentRules: function( style ) {
|
||||
var classes = style.getClassesArray();
|
||||
if ( !classes )
|
||||
return null;
|
||||
classes.push( '!' + cls );
|
||||
|
||||
return 'span(' + classes.join( ',' ) + ')';
|
||||
},
|
||||
pathName: editor.lang.mathjax.pathName,
|
||||
|
||||
template: '<span class="' + cls + '" style="display:inline-block" data-cke-survive=1></span>',
|
||||
|
||||
parts: {
|
||||
span: 'span'
|
||||
},
|
||||
|
||||
defaults: {
|
||||
math: '\\(x = {-b \\pm \\sqrt{b^2-4ac} \\over 2a}\\)'
|
||||
},
|
||||
|
||||
init: function() {
|
||||
var iframe = this.parts.span.getChild( 0 );
|
||||
|
||||
// Check if span contains iframe and create it otherwise.
|
||||
if ( !iframe || iframe.type != CKEDITOR.NODE_ELEMENT || !iframe.is( 'iframe' ) ) {
|
||||
iframe = new CKEDITOR.dom.element( 'iframe' );
|
||||
iframe.setAttributes( {
|
||||
style: 'border:0;width:0;height:0',
|
||||
scrolling: 'no',
|
||||
frameborder: 0,
|
||||
allowTransparency: true,
|
||||
src: CKEDITOR.plugins.mathjax.fixSrc
|
||||
} );
|
||||
this.parts.span.append( iframe );
|
||||
}
|
||||
|
||||
// Wait for ready because on some browsers iFrame will not
|
||||
// have document element until it is put into document.
|
||||
// This is a problem when you crate widget using dialog.
|
||||
this.once( 'ready', function() {
|
||||
// Src attribute must be recreated to fix custom domain error after undo
|
||||
// (see iFrame.removeAttribute( 'src' ) in frameWrapper.load).
|
||||
if ( CKEDITOR.env.ie )
|
||||
iframe.setAttribute( 'src', CKEDITOR.plugins.mathjax.fixSrc );
|
||||
|
||||
this.frameWrapper = new CKEDITOR.plugins.mathjax.frameWrapper( iframe, editor );
|
||||
this.frameWrapper.setValue( this.data.math );
|
||||
} );
|
||||
},
|
||||
|
||||
data: function() {
|
||||
if ( this.frameWrapper )
|
||||
this.frameWrapper.setValue( this.data.math );
|
||||
},
|
||||
|
||||
upcast: function( el, data ) {
|
||||
if ( !( el.name == 'span' && el.hasClass( cls ) ) )
|
||||
return;
|
||||
|
||||
if ( el.children.length > 1 || el.children[ 0 ].type != CKEDITOR.NODE_TEXT )
|
||||
return;
|
||||
|
||||
data.math = CKEDITOR.tools.htmlDecode( el.children[ 0 ].value );
|
||||
|
||||
// Add style display:inline-block to have proper height of widget wrapper and mask.
|
||||
var attrs = el.attributes;
|
||||
|
||||
if ( attrs.style )
|
||||
attrs.style += ';display:inline-block';
|
||||
else
|
||||
attrs.style = 'display:inline-block';
|
||||
|
||||
// Add attribute to prevent deleting empty span in data processing.
|
||||
attrs[ 'data-cke-survive' ] = 1;
|
||||
|
||||
el.children[ 0 ].remove();
|
||||
|
||||
return el;
|
||||
},
|
||||
|
||||
downcast: function( el ) {
|
||||
el.children[ 0 ].replaceWith( new CKEDITOR.htmlParser.text( CKEDITOR.tools.htmlEncode( this.data.math ) ) );
|
||||
|
||||
// Remove style display:inline-block.
|
||||
var attrs = el.attributes;
|
||||
attrs.style = attrs.style.replace( /display:\s?inline-block;?\s?/, '' );
|
||||
if ( attrs.style === '' )
|
||||
delete attrs.style;
|
||||
|
||||
return el;
|
||||
}
|
||||
} );
|
||||
|
||||
// Add dialog.
|
||||
CKEDITOR.dialog.add( 'mathjax', this.path + 'dialogs/mathjax.js' );
|
||||
|
||||
// Add MathJax script to page preview.
|
||||
editor.on( 'contentPreview', function( evt ) {
|
||||
evt.data.dataValue = evt.data.dataValue.replace(
|
||||
/<\/head>/,
|
||||
'<script src="' + CKEDITOR.getUrl( editor.config.mathJaxLib ) + '"><\/script><\/head>'
|
||||
);
|
||||
} );
|
||||
|
||||
editor.on( 'paste', function( evt ) {
|
||||
// Firefox does remove iFrame elements from pasted content so this event do the same on other browsers.
|
||||
// Also iFrame in paste content is reason of "Unspecified error" in IE9 (#10857).
|
||||
var regex = new RegExp( '<span[^>]*?' + cls + '.*?<\/span>', 'ig' );
|
||||
evt.data.dataValue = evt.data.dataValue.replace( regex, function( match ) {
|
||||
return match.replace( /(<iframe.*?\/iframe>)/i, '' );
|
||||
} );
|
||||
} );
|
||||
}
|
||||
} );
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @singleton
|
||||
* @class CKEDITOR.plugins.mathjax
|
||||
*/
|
||||
CKEDITOR.plugins.mathjax = {};
|
||||
|
||||
/**
|
||||
* A variable to fix problems with `iframe`. This variable is global
|
||||
* because it is used in both the widget and the dialog window.
|
||||
*
|
||||
* @private
|
||||
* @property {String} fixSrc
|
||||
*/
|
||||
CKEDITOR.plugins.mathjax.fixSrc =
|
||||
// In Firefox src must exist and be different than about:blank to emit load event.
|
||||
CKEDITOR.env.gecko ? 'javascript:true' : // jshint ignore:line
|
||||
// Support for custom document.domain in IE.
|
||||
CKEDITOR.env.ie ? 'javascript:' + // jshint ignore:line
|
||||
'void((function(){' + encodeURIComponent(
|
||||
'document.open();' +
|
||||
'(' + CKEDITOR.tools.fixDomain + ')();' +
|
||||
'document.close();'
|
||||
) + '})())' :
|
||||
// In Chrome src must be undefined to emit load event.
|
||||
'javascript:void(0)'; // jshint ignore:line
|
||||
|
||||
/**
|
||||
* Loading indicator image generated by http://preloaders.net.
|
||||
*
|
||||
* @private
|
||||
* @property {String} loadingIcon
|
||||
*/
|
||||
CKEDITOR.plugins.mathjax.loadingIcon = CKEDITOR.plugins.get( 'mathjax' ).path + 'images/loader.gif';
|
||||
|
||||
/**
|
||||
* Computes predefined styles and copies them to another element.
|
||||
*
|
||||
* @private
|
||||
* @param {CKEDITOR.dom.element} from Copy source.
|
||||
* @param {CKEDITOR.dom.element} to Copy target.
|
||||
*/
|
||||
CKEDITOR.plugins.mathjax.copyStyles = function( from, to ) {
|
||||
var stylesToCopy = [ 'color', 'font-family', 'font-style', 'font-weight', 'font-variant', 'font-size' ];
|
||||
|
||||
for ( var i = 0; i < stylesToCopy.length; i++ ) {
|
||||
var key = stylesToCopy[ i ],
|
||||
val = from.getComputedStyle( key );
|
||||
if ( val )
|
||||
to.setStyle( key, val );
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Trims MathJax value from '\(1+1=2\)' to '1+1=2'.
|
||||
*
|
||||
* @private
|
||||
* @param {String} value String to trim.
|
||||
* @returns {String} Trimed string.
|
||||
*/
|
||||
CKEDITOR.plugins.mathjax.trim = function( value ) {
|
||||
var begin = value.indexOf( '\\(' ) + 2,
|
||||
end = value.lastIndexOf( '\\)' );
|
||||
|
||||
return value.substring( begin, end );
|
||||
};
|
||||
|
||||
/**
|
||||
* FrameWrapper is responsible for communication between the MathJax library
|
||||
* and the `iframe` element that is used for rendering mathematical formulas
|
||||
* inside the editor.
|
||||
* It lets you create visual mathematics by using the
|
||||
* {@link CKEDITOR.plugins.mathjax.frameWrapper#setValue setValue} method.
|
||||
*
|
||||
* @private
|
||||
* @class CKEDITOR.plugins.mathjax.frameWrapper
|
||||
* @constructor Creates a class instance.
|
||||
* @param {CKEDITOR.dom.element} iFrame The `iframe` element to be wrapped.
|
||||
* @param {CKEDITOR.editor} editor The editor instance.
|
||||
*/
|
||||
if ( !( CKEDITOR.env.ie && CKEDITOR.env.version == 8 ) ) {
|
||||
CKEDITOR.plugins.mathjax.frameWrapper = function( iFrame, editor ) {
|
||||
|
||||
var buffer, preview, value, newValue,
|
||||
doc = iFrame.getFrameDocument(),
|
||||
|
||||
// Is MathJax loaded and ready to work.
|
||||
isInit = false,
|
||||
|
||||
// Is MathJax parsing Tex.
|
||||
isRunning = false,
|
||||
|
||||
// Function called when MathJax is loaded.
|
||||
loadedHandler = CKEDITOR.tools.addFunction( function() {
|
||||
preview = doc.getById( 'preview' );
|
||||
buffer = doc.getById( 'buffer' );
|
||||
isInit = true;
|
||||
|
||||
if ( newValue )
|
||||
update();
|
||||
|
||||
// Private! For test usage only.
|
||||
CKEDITOR.fire( 'mathJaxLoaded', iFrame );
|
||||
} ),
|
||||
|
||||
// Function called when MathJax finish his job.
|
||||
updateDoneHandler = CKEDITOR.tools.addFunction( function() {
|
||||
CKEDITOR.plugins.mathjax.copyStyles( iFrame, preview );
|
||||
|
||||
preview.setHtml( buffer.getHtml() );
|
||||
|
||||
editor.fire( 'lockSnapshot' );
|
||||
|
||||
iFrame.setStyles( {
|
||||
height: 0,
|
||||
width: 0
|
||||
} );
|
||||
|
||||
// Set iFrame dimensions.
|
||||
var height = Math.max( doc.$.body.offsetHeight, doc.$.documentElement.offsetHeight ),
|
||||
width = Math.max( preview.$.offsetWidth, doc.$.body.scrollWidth );
|
||||
|
||||
iFrame.setStyles( {
|
||||
height: height + 'px',
|
||||
width: width + 'px'
|
||||
} );
|
||||
|
||||
editor.fire( 'unlockSnapshot' );
|
||||
|
||||
// Private! For test usage only.
|
||||
CKEDITOR.fire( 'mathJaxUpdateDone', iFrame );
|
||||
|
||||
// If value changed in the meantime update it again.
|
||||
if ( value != newValue )
|
||||
update();
|
||||
else
|
||||
isRunning = false;
|
||||
} );
|
||||
|
||||
iFrame.on( 'load', load );
|
||||
|
||||
load();
|
||||
|
||||
function load() {
|
||||
doc = iFrame.getFrameDocument();
|
||||
|
||||
if ( doc.getById( 'preview' ) )
|
||||
return;
|
||||
|
||||
// Because of IE9 bug in a src attribute can not be javascript
|
||||
// when you undo (#10930). If you have iFrame with javascript in src
|
||||
// and call insertBefore on such element then IE9 will see crash.
|
||||
if ( CKEDITOR.env.ie )
|
||||
iFrame.removeAttribute( 'src' );
|
||||
|
||||
doc.write( '<!DOCTYPE html>' +
|
||||
'<html>' +
|
||||
'<head>' +
|
||||
'<meta charset="utf-8">' +
|
||||
'<script type="text/x-mathjax-config">' +
|
||||
|
||||
// MathJax configuration, disable messages.
|
||||
'MathJax.Hub.Config( {' +
|
||||
'showMathMenu: false,' +
|
||||
'messageStyle: "none"' +
|
||||
'} );' +
|
||||
|
||||
// Get main CKEDITOR form parent.
|
||||
'function getCKE() {' +
|
||||
'if ( typeof window.parent.CKEDITOR == \'object\' ) {' +
|
||||
'return window.parent.CKEDITOR;' +
|
||||
'} else {' +
|
||||
'return window.parent.parent.CKEDITOR;' +
|
||||
'}' +
|
||||
'}' +
|
||||
|
||||
// Run MathJax.Hub with its actual parser and call callback function after that.
|
||||
// Because MathJax.Hub is asynchronous create MathJax.Hub.Queue to wait with callback.
|
||||
'function update() {' +
|
||||
'MathJax.Hub.Queue(' +
|
||||
'[ \'Typeset\', MathJax.Hub, this.buffer ],' +
|
||||
'function() {' +
|
||||
'getCKE().tools.callFunction( ' + updateDoneHandler + ' );' +
|
||||
'}' +
|
||||
');' +
|
||||
'}' +
|
||||
|
||||
// Run MathJax for the first time, when the script is loaded.
|
||||
// Callback function will be called then it's done.
|
||||
'MathJax.Hub.Queue( function() {' +
|
||||
'getCKE().tools.callFunction(' + loadedHandler + ');' +
|
||||
'} );' +
|
||||
'</script>' +
|
||||
|
||||
// Load MathJax lib.
|
||||
'<script src="' + ( editor.config.mathJaxLib ) + '"></script>' +
|
||||
'</head>' +
|
||||
'<body style="padding:0;margin:0;background:transparent;overflow:hidden">' +
|
||||
'<span id="preview"></span>' +
|
||||
|
||||
// Render everything here and after that copy it to the preview.
|
||||
'<span id="buffer" style="display:none"></span>' +
|
||||
'</body>' +
|
||||
'</html>' );
|
||||
}
|
||||
|
||||
// Run MathJax parsing Tex.
|
||||
function update() {
|
||||
isRunning = true;
|
||||
|
||||
value = newValue;
|
||||
|
||||
editor.fire( 'lockSnapshot' );
|
||||
|
||||
buffer.setHtml( value );
|
||||
|
||||
// Set loading indicator.
|
||||
preview.setHtml( '<img src=' + CKEDITOR.plugins.mathjax.loadingIcon + ' alt=' + editor.lang.mathjax.loading + '>' );
|
||||
|
||||
iFrame.setStyles( {
|
||||
height: '16px',
|
||||
width: '16px',
|
||||
display: 'inline',
|
||||
'vertical-align': 'middle'
|
||||
} );
|
||||
|
||||
editor.fire( 'unlockSnapshot' );
|
||||
|
||||
// Run MathJax.
|
||||
doc.getWindow().$.update( value );
|
||||
}
|
||||
|
||||
return {
|
||||
/**
|
||||
* Sets the TeX value to be displayed in the `iframe` element inside
|
||||
* the editor. This function will activate the MathJax
|
||||
* library which interprets TeX expressions and converts them into
|
||||
* their representation that is displayed in the editor.
|
||||
*
|
||||
* @param {String} value TeX string.
|
||||
*/
|
||||
setValue: function( value ) {
|
||||
newValue = CKEDITOR.tools.htmlEncode( value );
|
||||
|
||||
if ( isInit && !isRunning )
|
||||
update();
|
||||
}
|
||||
};
|
||||
};
|
||||
} else {
|
||||
// In IE8 MathJax does not work stable so instead of using standard
|
||||
// frame wrapper it is replaced by placeholder to show pure TeX in iframe.
|
||||
CKEDITOR.plugins.mathjax.frameWrapper = function( iFrame, editor ) {
|
||||
iFrame.getFrameDocument().write( '<!DOCTYPE html>' +
|
||||
'<html>' +
|
||||
'<head>' +
|
||||
'<meta charset="utf-8">' +
|
||||
'</head>' +
|
||||
'<body style="padding:0;margin:0;background:transparent;overflow:hidden">' +
|
||||
'<span style="white-space:nowrap;" id="tex"></span>' +
|
||||
'</body>' +
|
||||
'</html>' );
|
||||
|
||||
return {
|
||||
setValue: function( value ) {
|
||||
var doc = iFrame.getFrameDocument(),
|
||||
tex = doc.getById( 'tex' );
|
||||
|
||||
tex.setHtml( CKEDITOR.plugins.mathjax.trim( CKEDITOR.tools.htmlEncode( value ) ) );
|
||||
|
||||
CKEDITOR.plugins.mathjax.copyStyles( iFrame, tex );
|
||||
|
||||
editor.fire( 'lockSnapshot' );
|
||||
|
||||
iFrame.setStyles( {
|
||||
width: Math.min( 250, tex.$.offsetWidth ) + 'px',
|
||||
height: doc.$.body.offsetHeight + 'px',
|
||||
display: 'inline',
|
||||
'vertical-align': 'middle'
|
||||
} );
|
||||
|
||||
editor.fire( 'unlockSnapshot' );
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
} )();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* Read more in the [documentation](#!/guide/dev_mathjax)
|
||||
* and see the [SDK sample](http://sdk.ckeditor.com/samples/mathjax.html).
|
||||
*
|
||||
* config.mathJaxLib = '//cdn.mathjax.org/mathjax/2.6-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
|
||||
*/
|
||||
|
||||
/**
|
||||
* Sets the default class for `span` elements that will be
|
||||
* converted into [Mathematical Formulas](http://ckeditor.com/addon/mathjax)
|
||||
* widgets.
|
||||
*
|
||||
* If you set it to the following:
|
||||
*
|
||||
* config.mathJaxClass = 'my-math';
|
||||
*
|
||||
* The code below will be recognized as a Mathematical Formulas widget.
|
||||
*
|
||||
* <span class="my-math">\( \sqrt{4} = 2 \)</span>
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
Reference in New Issue
Block a user