mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-20 17:18:51 +02:00
✨ FAF: Mention people in caselogs
This commit is contained in:
@@ -1,83 +1,19 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
/*
|
||||
* Copyright (C) 2013-2019 Combodo SARL
|
||||
*
|
||||
* This file is part of iTop.
|
||||
*
|
||||
* iTop is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* iTop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
( function() {
|
||||
CKEDITOR.dialog.add( 'codeSnippet', function( editor ) {
|
||||
var snippetLangs = editor._.codesnippet.langs,
|
||||
lang = editor.lang.codesnippet,
|
||||
clientHeight = document.documentElement.clientHeight,
|
||||
langSelectItems = [],
|
||||
snippetLangId;
|
||||
|
||||
langSelectItems.push( [ editor.lang.common.notSet, '' ] );
|
||||
|
||||
for ( snippetLangId in snippetLangs )
|
||||
langSelectItems.push( [ snippetLangs[ snippetLangId ], snippetLangId ] );
|
||||
|
||||
// Size adjustments.
|
||||
var size = CKEDITOR.document.getWindow().getViewPaneSize(),
|
||||
// Make it maximum 800px wide, but still fully visible in the viewport.
|
||||
width = Math.min( size.width - 70, 800 ),
|
||||
// Make it use 2/3 of the viewport height.
|
||||
height = size.height / 1.5;
|
||||
|
||||
// Low resolution settings.
|
||||
if ( clientHeight < 650 ) {
|
||||
height = clientHeight - 220;
|
||||
}
|
||||
|
||||
return {
|
||||
title: lang.title,
|
||||
minHeight: 200,
|
||||
resizable: CKEDITOR.DIALOG_RESIZE_NONE,
|
||||
contents: [
|
||||
{
|
||||
id: 'info',
|
||||
elements: [
|
||||
{
|
||||
id: 'lang',
|
||||
type: 'select',
|
||||
label: lang.language,
|
||||
items: langSelectItems,
|
||||
setup: function( widget ) {
|
||||
if ( widget.ready && widget.data.lang )
|
||||
this.setValue( widget.data.lang );
|
||||
|
||||
// The only way to have an empty select value in Firefox is
|
||||
// to set a negative selectedIndex.
|
||||
if ( CKEDITOR.env.gecko && ( !widget.data.lang || !widget.ready ) )
|
||||
this.getInputElement().$.selectedIndex = -1;
|
||||
},
|
||||
commit: function( widget ) {
|
||||
widget.setData( 'lang', this.getValue() );
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'code',
|
||||
type: 'textarea',
|
||||
label: lang.codeContents,
|
||||
setup: function( widget ) {
|
||||
this.setValue( widget.data.code );
|
||||
},
|
||||
commit: function( widget ) {
|
||||
widget.setData( 'code', this.getValue() );
|
||||
},
|
||||
required: true,
|
||||
validate: CKEDITOR.dialog.validate.notEmpty( lang.emptySnippetError ),
|
||||
inputStyle: 'cursor:auto;' +
|
||||
'width:' + width + 'px;' +
|
||||
'height:' + height + 'px;' +
|
||||
'tab-size:4;' +
|
||||
'text-align:left;',
|
||||
'class': 'cke_source'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
} );
|
||||
}() );
|
||||
(function(){CKEDITOR.dialog.add("codeSnippet",function(c){var b=c._.codesnippet.langs,d=c.lang.codesnippet,g=document.documentElement.clientHeight,e=[],f;e.push([c.lang.common.notSet,""]);for(f in b)e.push([b[f],f]);b=CKEDITOR.document.getWindow().getViewPaneSize();c=Math.min(b.width-70,800);b=b.height/1.5;650>g&&(b=g-220);return{title:d.title,minHeight:200,resizable:CKEDITOR.DIALOG_RESIZE_NONE,contents:[{id:"info",elements:[{id:"lang",type:"select",label:d.language,items:e,setup:function(a){a.ready&&
|
||||
a.data.lang&&this.setValue(a.data.lang);!CKEDITOR.env.gecko||a.data.lang&&a.ready||(this.getInputElement().$.selectedIndex=-1)},commit:function(a){a.setData("lang",this.getValue())}},{id:"code",type:"textarea",label:d.codeContents,setup:function(a){this.setValue(a.data.code)},commit:function(a){a.setData("code",this.getValue())},required:!0,validate:CKEDITOR.dialog.validate.notEmpty(d.emptySnippetError),inputStyle:"cursor:auto;width:"+c+"px;height:"+b+"px;tab-size:4;text-align:left;","class":"cke_source"}]}]}})})();
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 532 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 KiB |
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'ar', {
|
||||
button: 'أدمج قصاصة الشيفرة',
|
||||
codeContents: 'محتوى الشيفرة',
|
||||
emptySnippetError: 'قصاصة الشيفرة لايمكن أن تكون فارغة.',
|
||||
language: 'لغة',
|
||||
title: 'قصاصة الشيفرة',
|
||||
pathName: 'قصاصة الشيفرة'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'az', {
|
||||
button: 'Kodun parçasını əlavə et',
|
||||
codeContents: 'Kod',
|
||||
emptySnippetError: 'Kodun parçasını boş ola bilməz',
|
||||
language: 'Programlaşdırma dili',
|
||||
title: 'Kodun parçasını',
|
||||
pathName: 'kodun parçasını'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'bg', {
|
||||
button: 'Въвеждане на блок с код',
|
||||
codeContents: 'Съдържание на кода',
|
||||
emptySnippetError: 'Блока с код не може да бъде празен.',
|
||||
language: 'Език',
|
||||
title: 'Блок с код',
|
||||
pathName: 'блок с код'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'ca', {
|
||||
button: 'Insereix el fragment de codi',
|
||||
codeContents: 'Contingut del codi',
|
||||
emptySnippetError: 'El fragment de codi no pot estar buit.',
|
||||
language: 'Idioma',
|
||||
title: 'Fragment de codi',
|
||||
pathName: 'fragment de codi'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'cs', {
|
||||
button: 'Vložit úryvek kódu',
|
||||
codeContents: 'Obsah kódu',
|
||||
emptySnippetError: 'Úryvek kódu nemůže být prázdný.',
|
||||
language: 'Jazyk',
|
||||
title: 'Úryvek kódu',
|
||||
pathName: 'úryvek kódu'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'da', {
|
||||
button: 'Indsæt kodestykket her',
|
||||
codeContents: 'Koden',
|
||||
emptySnippetError: 'Kodestykket kan ikke være tomt.',
|
||||
language: 'Sprog',
|
||||
title: 'Kodestykke',
|
||||
pathName: 'kodestykke'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'de-ch', {
|
||||
button: 'Codeschnipsel einfügen',
|
||||
codeContents: 'Codeinhalt',
|
||||
emptySnippetError: 'Ein Codeschnipsel darf nicht leer sein.',
|
||||
language: 'Sprache',
|
||||
title: 'Codeschnipsel',
|
||||
pathName: 'Codeschnipsel'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'de', {
|
||||
button: 'Codeschnipsel einfügen',
|
||||
codeContents: 'Codeinhalt',
|
||||
emptySnippetError: 'Ein Codeschnipsel darf nicht leer sein.',
|
||||
language: 'Sprache',
|
||||
title: 'Codeschnipsel',
|
||||
pathName: 'Codeschnipsel'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'el', {
|
||||
button: 'Εισαγωγή Αποσπάσματος Κώδικα',
|
||||
codeContents: 'Περιεχόμενο κώδικα',
|
||||
emptySnippetError: 'Δεν γίνεται να είναι κενά τα αποσπάσματα κώδικα.',
|
||||
language: 'Γλώσσα',
|
||||
title: 'Απόσπασμα κώδικα',
|
||||
pathName: 'απόσπασμα κώδικα'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'en-gb', {
|
||||
button: 'Insert Code Snippet',
|
||||
codeContents: 'Code content',
|
||||
emptySnippetError: 'A code snippet cannot be empty.',
|
||||
language: 'Language',
|
||||
title: 'Code snippet',
|
||||
pathName: 'code snippet'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'en', {
|
||||
button: 'Insert Code Snippet',
|
||||
codeContents: 'Code content',
|
||||
emptySnippetError: 'A code snippet cannot be empty.',
|
||||
language: 'Language',
|
||||
title: 'Code snippet',
|
||||
pathName: 'code snippet'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'eo', {
|
||||
button: 'Enmeti kodaĵeron',
|
||||
codeContents: 'Kodenhavo',
|
||||
emptySnippetError: 'Kodaĵero ne povas esti malplena.',
|
||||
language: 'Lingvo',
|
||||
title: 'Kodaĵero',
|
||||
pathName: 'kodaĵero'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'es-mx', {
|
||||
button: 'Insertar fragmento de código',
|
||||
codeContents: 'Contenido del código',
|
||||
emptySnippetError: 'Un fragmento de código no puede estar vacio.',
|
||||
language: 'Idioma',
|
||||
title: 'Fragmento de código',
|
||||
pathName: 'fragmento de código'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'es', {
|
||||
button: 'Insertar fragmento de código',
|
||||
codeContents: 'Contenido del código',
|
||||
emptySnippetError: 'Un fragmento de código no puede estar vacío.',
|
||||
language: 'Lenguaje',
|
||||
title: 'Fragmento de código',
|
||||
pathName: 'fragmento de código'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'et', {
|
||||
button: 'Koodilõigu sisestamine',
|
||||
codeContents: 'Koodi sisu',
|
||||
emptySnippetError: 'A code snippet cannot be empty.', // MISSING
|
||||
language: 'Keel',
|
||||
title: 'Koodi vidin',
|
||||
pathName: 'code snippet' // MISSING
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'eu', {
|
||||
button: 'Txertatu kode zatia',
|
||||
codeContents: 'Kode edukia',
|
||||
emptySnippetError: 'Kode zatiak ezin du hutsik egon.',
|
||||
language: 'Lengoaia',
|
||||
title: 'Kode zatia',
|
||||
pathName: 'kode zatia'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'fa', {
|
||||
button: 'قرار دادن کد قطعه',
|
||||
codeContents: 'محتوای کد',
|
||||
emptySnippetError: 'کد نمی تواند خالی باشد.',
|
||||
language: 'زبان',
|
||||
title: 'کد قطعه',
|
||||
pathName: 'کد قطعه'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'fi', {
|
||||
button: 'Lisää koodileike',
|
||||
codeContents: 'Koodisisältö',
|
||||
emptySnippetError: 'Koodileike ei voi olla tyhjä.',
|
||||
language: 'Kieli',
|
||||
title: 'Koodileike',
|
||||
pathName: 'koodileike'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'fr-ca', {
|
||||
button: 'Insérer du code',
|
||||
codeContents: 'Code content', // MISSING
|
||||
emptySnippetError: 'A code snippet cannot be empty.', // MISSING
|
||||
language: 'Language', // MISSING
|
||||
title: 'Code snippet', // MISSING
|
||||
pathName: 'code snippet' // MISSING
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'fr', {
|
||||
button: 'Insérer un extrait de code',
|
||||
codeContents: 'Code',
|
||||
emptySnippetError: 'Un extrait de code ne peut pas être vide.',
|
||||
language: 'Langue',
|
||||
title: 'Extrait de code',
|
||||
pathName: 'extrait de code'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'gl', {
|
||||
button: 'Inserir fragmento de código',
|
||||
codeContents: 'Contido do código',
|
||||
emptySnippetError: 'Un fragmento de código non pode estar baleiro.',
|
||||
language: 'Linguaxe',
|
||||
title: 'Fragmento de código',
|
||||
pathName: 'fragmento de código'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'he', {
|
||||
button: 'הכנס קטע קוד',
|
||||
codeContents: 'תוכן קוד',
|
||||
emptySnippetError: 'קטע קוד לא יכול להיות ריק.',
|
||||
language: 'שפה',
|
||||
title: 'קטע קוד',
|
||||
pathName: 'code snippet' // MISSING
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'hr', {
|
||||
button: 'Ubaci isječak kôda',
|
||||
codeContents: 'Sadržaj kôda',
|
||||
emptySnippetError: 'Isječak kôda ne može biti prazan.',
|
||||
language: 'Jezik',
|
||||
title: 'Isječak kôda',
|
||||
pathName: 'isječak kôda'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'hu', {
|
||||
button: 'Illeszd be a kódtöredéket',
|
||||
codeContents: 'Kód tartalom',
|
||||
emptySnippetError: 'A kódtöredék nem lehet üres.',
|
||||
language: 'Nyelv',
|
||||
title: 'Kódtöredék',
|
||||
pathName: 'kódtöredék'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'id', {
|
||||
button: 'Masukkan potongan kode',
|
||||
codeContents: 'Konten kode',
|
||||
emptySnippetError: 'Potongan kode tidak boleh kosong',
|
||||
language: 'Bahasa',
|
||||
title: 'Potongan kode',
|
||||
pathName: 'potongan kode'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'it', {
|
||||
button: 'Inserisci frammento di codice',
|
||||
codeContents: 'Contenuto del codice',
|
||||
emptySnippetError: 'Un frammento di codice non può essere vuoto.',
|
||||
language: 'Lingua',
|
||||
title: 'Frammento di codice',
|
||||
pathName: 'frammento di codice'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'ja', {
|
||||
button: 'コードスニペットを挿入',
|
||||
codeContents: 'コード内容',
|
||||
emptySnippetError: 'コードスニペットを入力してください。',
|
||||
language: '言語',
|
||||
title: 'コードスニペット',
|
||||
pathName: 'コードスニペット'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'km', {
|
||||
button: 'Insert Code Snippet', // MISSING
|
||||
codeContents: 'មាតិកាកូដ',
|
||||
emptySnippetError: 'A code snippet cannot be empty.', // MISSING
|
||||
language: 'ភាសា',
|
||||
title: 'Code snippet', // MISSING
|
||||
pathName: 'code snippet' // MISSING
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'ko', {
|
||||
button: '코드 스니펫 삽입',
|
||||
codeContents: '코드 본문',
|
||||
emptySnippetError: '코드 스니펫은 빈칸일 수 없습니다.',
|
||||
language: '언어',
|
||||
title: '코드 스니펫',
|
||||
pathName: '코드 스니펫'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'ku', {
|
||||
button: 'تێخستنی تیتکی کۆد',
|
||||
codeContents: 'ناوەڕۆکی کۆد',
|
||||
emptySnippetError: 'تیتکی کۆد نابێت بەتاڵ بێت.',
|
||||
language: 'زمان',
|
||||
title: 'تیتکی کۆد',
|
||||
pathName: 'تیتکی کۆد'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'lt', {
|
||||
button: 'Įterpkite kodo gabaliuką',
|
||||
codeContents: 'Kodo turinys',
|
||||
emptySnippetError: 'Kodo fragmentas negali būti tusčias.',
|
||||
language: 'Kalba',
|
||||
title: 'Kodo fragmentas',
|
||||
pathName: 'kodo fragmentas'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'lv', {
|
||||
button: 'Ievietot koda fragmentu',
|
||||
codeContents: 'Koda saturs',
|
||||
emptySnippetError: 'Koda fragments nevar būt tukšs.',
|
||||
language: 'Valoda',
|
||||
title: 'Koda fragments',
|
||||
pathName: 'koda fragments'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'nb', {
|
||||
button: 'Sett inn kodesnutt',
|
||||
codeContents: 'Kodeinnhold',
|
||||
emptySnippetError: 'En kodesnutt kan ikke være tom.',
|
||||
language: 'Språk',
|
||||
title: 'Kodesnutt',
|
||||
pathName: 'kodesnutt'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'nl', {
|
||||
button: 'Stuk code invoegen',
|
||||
codeContents: 'Code',
|
||||
emptySnippetError: 'Een stuk code kan niet leeg zijn.',
|
||||
language: 'Taal',
|
||||
title: 'Stuk code',
|
||||
pathName: 'stuk code'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'no', {
|
||||
button: 'Sett inn kodesnutt',
|
||||
codeContents: 'Code content', // MISSING
|
||||
emptySnippetError: 'A code snippet cannot be empty.', // MISSING
|
||||
language: 'Language', // MISSING
|
||||
title: 'Code snippet', // MISSING
|
||||
pathName: 'code snippet' // MISSING
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'oc', {
|
||||
button: 'Inserir un extrait de còdi',
|
||||
codeContents: 'Còdi',
|
||||
emptySnippetError: 'Un extrait de còdi pòt pas èsser void.',
|
||||
language: 'Lenga',
|
||||
title: 'Extrait de còdi',
|
||||
pathName: 'extrait de còdi'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'pl', {
|
||||
button: 'Wstaw fragment kodu',
|
||||
codeContents: 'Treść kodu',
|
||||
emptySnippetError: 'Kod nie może być pusty.',
|
||||
language: 'Język',
|
||||
title: 'Fragment kodu',
|
||||
pathName: 'fragment kodu'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'pt-br', {
|
||||
button: 'Inserir fragmento de código',
|
||||
codeContents: 'Conteúdo do código',
|
||||
emptySnippetError: 'Um fragmento de código não pode ser vazio',
|
||||
language: 'Idioma',
|
||||
title: 'Fragmento de código',
|
||||
pathName: 'fragmento de código'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'pt', {
|
||||
button: 'Inserir fragmento de código',
|
||||
codeContents: 'Conteúdo do código',
|
||||
emptySnippetError: 'A code snippet cannot be empty.', // MISSING
|
||||
language: 'Idioma',
|
||||
title: 'Segmento de código',
|
||||
pathName: 'Fragmento de código'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'ro', {
|
||||
button: 'Adaugă segment de cod',
|
||||
codeContents: 'Conținutul codului',
|
||||
emptySnippetError: 'Un segment de cod nu poate fi gol.',
|
||||
language: 'Limba',
|
||||
title: 'Segment de cod',
|
||||
pathName: 'segment de cod'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'ru', {
|
||||
button: 'Вставить сниппет',
|
||||
codeContents: 'Содержимое кода',
|
||||
emptySnippetError: 'Сниппет не может быть пустым',
|
||||
language: 'Язык',
|
||||
title: 'Сниппет',
|
||||
pathName: 'сниппет'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'sk', {
|
||||
button: 'Vložte ukážku programového kódu',
|
||||
codeContents: 'Obsah kódu',
|
||||
emptySnippetError: 'Ukážka kódu nesmie byť prázdna.',
|
||||
language: 'Jazyk',
|
||||
title: 'Ukážka programového kódu',
|
||||
pathName: 'ukážka programového kódu'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'sl', {
|
||||
button: 'Vstavi odsek kode',
|
||||
codeContents: 'Vsebina kode',
|
||||
emptySnippetError: 'Odsek kode ne more biti prazen.',
|
||||
language: 'Jezik',
|
||||
title: 'Odsek kode',
|
||||
pathName: 'odsek kode'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'sq', {
|
||||
button: 'Shto kod copëze',
|
||||
codeContents: 'Përmbajtja e kodit',
|
||||
emptySnippetError: 'Copëza e kodit nuk mund të jetë e zbrazët.',
|
||||
language: 'Gjuha',
|
||||
title: 'Copëza e kodit',
|
||||
pathName: 'copëza e kodit'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'sv', {
|
||||
button: 'Infoga kodsnutt',
|
||||
codeContents: 'Kodinnehålll',
|
||||
emptySnippetError: 'Innehåll krävs för kodsnutt',
|
||||
language: 'Språk',
|
||||
title: 'Kodsnutt',
|
||||
pathName: 'kodsnutt'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'th', {
|
||||
button: 'แทรกชิ้นส่วนของรหัสหรือโค้ด',
|
||||
codeContents: 'Code content', // MISSING
|
||||
emptySnippetError: 'A code snippet cannot be empty.', // MISSING
|
||||
language: 'Language', // MISSING
|
||||
title: 'Code snippet', // MISSING
|
||||
pathName: 'code snippet' // MISSING
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'tr', {
|
||||
button: 'Kod parçacığı ekle',
|
||||
codeContents: 'Kod',
|
||||
emptySnippetError: 'Kod parçacığı boş bırakılamaz',
|
||||
language: 'Dil',
|
||||
title: 'Kod parçacığı',
|
||||
pathName: 'kod parçacığı'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'tt', {
|
||||
button: 'Код өзеген өстәү',
|
||||
codeContents: 'Код эчтәлеге',
|
||||
emptySnippetError: 'Код өзеге буш булмаска тиеш.',
|
||||
language: 'Тел',
|
||||
title: 'Код өзеге',
|
||||
pathName: 'код өзеге'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'ug', {
|
||||
button: 'كود پارچىسى قىستۇرۇش',
|
||||
codeContents: 'كود مەزمۇنى',
|
||||
emptySnippetError: 'كود پارچىسى بوش قالمايدۇ',
|
||||
language: 'تىل',
|
||||
title: 'كود پارچىسى',
|
||||
pathName: 'كود پارچىسى'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'uk', {
|
||||
button: 'Вставити фрагмент коду',
|
||||
codeContents: 'Код',
|
||||
emptySnippetError: 'Фрагмент коду не можи бути порожнім.',
|
||||
language: 'Мова',
|
||||
title: 'Фрагмент коду',
|
||||
pathName: 'фрагмент коду'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'vi', {
|
||||
button: 'Chèn đoạn mã',
|
||||
codeContents: 'Nội dung mã',
|
||||
emptySnippetError: 'Một đoạn mã không thể để trống.',
|
||||
language: 'Ngôn ngữ',
|
||||
title: 'Đoạn mã',
|
||||
pathName: 'mã dính'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'zh-cn', {
|
||||
button: '插入代码段',
|
||||
codeContents: '代码内容',
|
||||
emptySnippetError: '插入的代码不能为空。',
|
||||
language: '代码语言',
|
||||
title: '代码段',
|
||||
pathName: '代码段'
|
||||
} );
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
CKEDITOR.plugins.setLang( 'codesnippet', 'zh', {
|
||||
button: '插入程式碼片段',
|
||||
codeContents: '程式碼內容',
|
||||
emptySnippetError: '程式碼片段不可為空白。',
|
||||
language: '語言',
|
||||
title: '程式碼片段',
|
||||
pathName: '程式碼片段'
|
||||
} );
|
||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2019 Combodo SARL
|
||||
*
|
||||
* This file is part of iTop.
|
||||
*
|
||||
* iTop is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* iTop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
|
||||
/* Base16 Atelier Dune Dark - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
/* https://github.com/jmblog/color-themes-for-highlightjs */
|
||||
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2019 Combodo SARL
|
||||
*
|
||||
* This file is part of iTop.
|
||||
*
|
||||
* iTop is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* iTop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
|
||||
/* Base16 Atelier Dune Light - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
/* https://github.com/jmblog/color-themes-for-highlightjs */
|
||||
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2019 Combodo SARL
|
||||
*
|
||||
* This file is part of iTop.
|
||||
*
|
||||
* iTop is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* iTop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
|
||||
/* Base16 Atelier Forest Dark - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
/* https://github.com/jmblog/color-themes-for-highlightjs */
|
||||
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2019 Combodo SARL
|
||||
*
|
||||
* This file is part of iTop.
|
||||
*
|
||||
* iTop is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* iTop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
|
||||
/* Base16 Atelier Forest Light - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
/* https://github.com/jmblog/color-themes-for-highlightjs */
|
||||
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2019 Combodo SARL
|
||||
*
|
||||
* This file is part of iTop.
|
||||
*
|
||||
* iTop is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* iTop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
|
||||
/* Base16 Atelier Heath Dark - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
/* https://github.com/jmblog/color-themes-for-highlightjs */
|
||||
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2019 Combodo SARL
|
||||
*
|
||||
* This file is part of iTop.
|
||||
*
|
||||
* iTop is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* iTop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
|
||||
/* Base16 Atelier Heath Light - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
/* https://github.com/jmblog/color-themes-for-highlightjs */
|
||||
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2019 Combodo SARL
|
||||
*
|
||||
* This file is part of iTop.
|
||||
*
|
||||
* iTop is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* iTop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
|
||||
/* Base16 Atelier Lakeside Dark - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/) */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
/* https://github.com/jmblog/color-themes-for-highlightjs */
|
||||
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2019 Combodo SARL
|
||||
*
|
||||
* This file is part of iTop.
|
||||
*
|
||||
* iTop is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* iTop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
|
||||
/* Base16 Atelier Lakeside Light - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/) */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
/* https://github.com/jmblog/color-themes-for-highlightjs */
|
||||
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2019 Combodo SARL
|
||||
*
|
||||
* This file is part of iTop.
|
||||
*
|
||||
* iTop is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* iTop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
|
||||
/* Base16 Atelier Seaside Dark - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/) */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
/* https://github.com/jmblog/color-themes-for-highlightjs */
|
||||
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2019 Combodo SARL
|
||||
*
|
||||
* This file is part of iTop.
|
||||
*
|
||||
* iTop is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* iTop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
|
||||
/* Base16 Atelier Seaside Light - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/) */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
/* https://github.com/jmblog/color-themes-for-highlightjs */
|
||||
|
||||
|
||||
@@ -1,4 +1,22 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2019 Combodo SARL
|
||||
*
|
||||
* This file is part of iTop.
|
||||
*
|
||||
* iTop is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* iTop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
|
||||
/*
|
||||
Description: Magula style for highligh.js
|
||||
Author: Ruslan Keba <rukeba@gmail.com>
|
||||
Website: http://rukeba.com/
|
||||
@@ -120,4 +138,3 @@ Music: Aphex Twin / Xtal
|
||||
font-weight: bold;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2019 Combodo SARL
|
||||
*
|
||||
* This file is part of iTop.
|
||||
*
|
||||
* iTop is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* iTop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
Zenburn style from voldmar.ru (c) Vladimir Epifanov <voldmar@voldmar.ru>
|
||||
@@ -114,4 +132,3 @@ based on dark.css by Ivan Sagalaev
|
||||
.xml .hljs-cdata {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,484 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileOverview Rich code snippets for CKEditor.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
( function() {
|
||||
var isBrowserSupported = !CKEDITOR.env.ie || CKEDITOR.env.version > 8;
|
||||
|
||||
CKEDITOR.plugins.add( 'codesnippet', {
|
||||
requires: 'widget,dialog',
|
||||
lang: 'ar,az,bg,ca,cs,da,de,de-ch,el,en,en-au,en-gb,eo,es,es-mx,et,eu,fa,fi,fr,fr-ca,gl,he,hr,hu,id,it,ja,km,ko,ku,lt,lv,nb,nl,no,oc,pl,pt,pt-br,ro,ru,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
|
||||
icons: 'codesnippet', // %REMOVE_LINE_CORE%
|
||||
hidpi: true, // %REMOVE_LINE_CORE%
|
||||
|
||||
beforeInit: function( editor ) {
|
||||
editor._.codesnippet = {};
|
||||
|
||||
/**
|
||||
* Sets the custom syntax highlighter. See {@link CKEDITOR.plugins.codesnippet.highlighter}
|
||||
* to learn how to register a custom highlighter.
|
||||
*
|
||||
* **Note**:
|
||||
*
|
||||
* * This method can only be called while initialising plugins (in one of
|
||||
* the three callbacks).
|
||||
* * This method is accessible through the `editor.plugins.codesnippet` namespace only.
|
||||
*
|
||||
* @since 4.4
|
||||
* @member CKEDITOR.plugins.codesnippet
|
||||
* @param {CKEDITOR.plugins.codesnippet.highlighter} highlighter
|
||||
*/
|
||||
this.setHighlighter = function( highlighter ) {
|
||||
editor._.codesnippet.highlighter = highlighter;
|
||||
|
||||
var langs = editor._.codesnippet.langs =
|
||||
editor.config.codeSnippet_languages || highlighter.languages;
|
||||
|
||||
// We might escape special regex chars below, but we expect that there
|
||||
// should be no crazy values used as lang keys.
|
||||
editor._.codesnippet.langsRegex = new RegExp( '(?:^|\\s)language-(' +
|
||||
CKEDITOR.tools.objectKeys( langs ).join( '|' ) + ')(?:\\s|$)' );
|
||||
};
|
||||
|
||||
editor.once( 'pluginsLoaded', function() {
|
||||
// Remove the method once it cannot be used, because it leaks the editor reference (#589).
|
||||
this.setHighlighter = null;
|
||||
}, this );
|
||||
},
|
||||
|
||||
onLoad: function() {
|
||||
CKEDITOR.dialog.add( 'codeSnippet', this.path + 'dialogs/codesnippet.js' );
|
||||
},
|
||||
|
||||
init: function( editor ) {
|
||||
editor.ui.addButton && editor.ui.addButton( 'CodeSnippet', {
|
||||
label: editor.lang.codesnippet.button,
|
||||
command: 'codeSnippet',
|
||||
toolbar: 'insert,10'
|
||||
} );
|
||||
},
|
||||
|
||||
afterInit: function( editor ) {
|
||||
var path = this.path;
|
||||
|
||||
registerWidget( editor );
|
||||
|
||||
// At the very end, if no custom highlighter was set so far (by plugin#setHighlighter)
|
||||
// we will set default one.
|
||||
if ( !editor._.codesnippet.highlighter ) {
|
||||
var hljsHighlighter = new CKEDITOR.plugins.codesnippet.highlighter( {
|
||||
languages: {
|
||||
apache: 'Apache',
|
||||
bash: 'Bash',
|
||||
coffeescript: 'CoffeeScript',
|
||||
cpp: 'C++',
|
||||
cs: 'C#',
|
||||
css: 'CSS',
|
||||
diff: 'Diff',
|
||||
html: 'HTML',
|
||||
http: 'HTTP',
|
||||
ini: 'INI',
|
||||
java: 'Java',
|
||||
javascript: 'JavaScript',
|
||||
json: 'JSON',
|
||||
makefile: 'Makefile',
|
||||
markdown: 'Markdown',
|
||||
nginx: 'Nginx',
|
||||
objectivec: 'Objective-C',
|
||||
perl: 'Perl',
|
||||
php: 'PHP',
|
||||
python: 'Python',
|
||||
ruby: 'Ruby',
|
||||
sql: 'SQL',
|
||||
vbscript: 'VBScript',
|
||||
xhtml: 'XHTML',
|
||||
xml: 'XML'
|
||||
},
|
||||
|
||||
init: function( callback ) {
|
||||
var that = this;
|
||||
|
||||
if ( isBrowserSupported ) {
|
||||
CKEDITOR.scriptLoader.load( path + 'lib/highlight/highlight.pack.js', function() {
|
||||
that.hljs = window.hljs;
|
||||
callback();
|
||||
} );
|
||||
}
|
||||
|
||||
// Method is available only if wysiwygarea exists.
|
||||
if ( editor.addContentsCss ) {
|
||||
editor.addContentsCss( path + 'lib/highlight/styles/' + editor.config.codeSnippet_theme + '.css' );
|
||||
}
|
||||
},
|
||||
|
||||
highlighter: function( code, language, callback ) {
|
||||
var highlighted = this.hljs.highlightAuto( code,
|
||||
this.hljs.getLanguage( language ) ? [ language ] : undefined );
|
||||
|
||||
if ( highlighted )
|
||||
callback( highlighted.value );
|
||||
}
|
||||
} );
|
||||
|
||||
this.setHighlighter( hljsHighlighter );
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
/**
|
||||
* Global helpers and classes of the Code Snippet plugin.
|
||||
*
|
||||
* For more information see the {@glink guide/dev_codesnippet Code Snippet Guide}.
|
||||
*
|
||||
* @class
|
||||
* @singleton
|
||||
*/
|
||||
CKEDITOR.plugins.codesnippet = {
|
||||
highlighter: Highlighter
|
||||
};
|
||||
|
||||
/**
|
||||
* A Code Snippet highlighter. It can be set as a default highlighter
|
||||
* using {@link CKEDITOR.plugins.codesnippet#setHighlighter}, for example:
|
||||
*
|
||||
* // Create a new plugin which registers a custom code highlighter
|
||||
* // based on customEngine in order to replace the one that comes
|
||||
* // with the Code Snippet plugin.
|
||||
* CKEDITOR.plugins.add( 'myCustomHighlighter', {
|
||||
* afterInit: function( editor ) {
|
||||
* // Create a new instance of the highlighter.
|
||||
* var myHighlighter = new CKEDITOR.plugins.codesnippet.highlighter( {
|
||||
* init: function( ready ) {
|
||||
* // Asynchronous code to load resources and libraries for customEngine.
|
||||
* customEngine.loadResources( function() {
|
||||
* // Let the editor know that everything is ready.
|
||||
* ready();
|
||||
* } );
|
||||
* },
|
||||
* highlighter: function( code, language, callback ) {
|
||||
* // Let the customEngine highlight the code.
|
||||
* customEngine.highlight( code, language, function() {
|
||||
* callback( highlightedCode );
|
||||
* } );
|
||||
* }
|
||||
* } );
|
||||
*
|
||||
* // Check how it performs.
|
||||
* myHighlighter.highlight( 'foo()', 'javascript', function( highlightedCode ) {
|
||||
* console.log( highlightedCode ); // -> <span class="pretty">foo()</span>
|
||||
* } );
|
||||
*
|
||||
* // From now on, myHighlighter will be used as a Code Snippet
|
||||
* // highlighter, overwriting the default engine.
|
||||
* editor.plugins.codesnippet.setHighlighter( myHighlighter );
|
||||
* }
|
||||
* } );
|
||||
*
|
||||
* @since 4.4
|
||||
* @class CKEDITOR.plugins.codesnippet.highlighter
|
||||
* @extends CKEDITOR.plugins.codesnippet
|
||||
* @param {Object} def Highlighter definition. See {@link #highlighter}, {@link #init} and {@link #languages}.
|
||||
*/
|
||||
function Highlighter( def ) {
|
||||
CKEDITOR.tools.extend( this, def );
|
||||
|
||||
/**
|
||||
* A queue of {@link #highlight} jobs to be
|
||||
* done once the highlighter is {@link #ready}.
|
||||
*
|
||||
* @readonly
|
||||
* @property {Array} [=[]]
|
||||
*/
|
||||
this.queue = [];
|
||||
|
||||
// Async init – execute jobs when ready.
|
||||
if ( this.init ) {
|
||||
this.init( CKEDITOR.tools.bind( function() {
|
||||
// Execute pending jobs.
|
||||
var job;
|
||||
|
||||
while ( ( job = this.queue.pop() ) )
|
||||
job.call( this );
|
||||
|
||||
this.ready = true;
|
||||
}, this ) );
|
||||
} else {
|
||||
this.ready = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* If specified, this function should asynchronously load highlighter-specific
|
||||
* resources and execute `ready` when the highlighter is ready.
|
||||
*
|
||||
* @property {Function} [init]
|
||||
* @param {Function} ready The function to be called once
|
||||
* the highlighter is {@link #ready}.
|
||||
*/
|
||||
|
||||
/**
|
||||
* A function which highlights given plain text `code` in a given `language` and, once done,
|
||||
* calls the `callback` function with highlighted markup as an argument.
|
||||
*
|
||||
* @property {Function} [highlighter]
|
||||
* @param {String} code Code to be formatted.
|
||||
* @param {String} lang Language to be used ({@link CKEDITOR.config#codeSnippet_languages}).
|
||||
* @param {Function} callback Function which accepts highlighted String as an argument.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Defines languages supported by the highlighter.
|
||||
* They can be restricted with the {@link CKEDITOR.config#codeSnippet_languages} configuration option.
|
||||
*
|
||||
* **Note**: If {@link CKEDITOR.config#codeSnippet_languages} is set, **it will
|
||||
* overwrite** the languages listed in `languages`.
|
||||
*
|
||||
* languages: {
|
||||
* coffeescript: 'CoffeeScript',
|
||||
* cpp: 'C++',
|
||||
* cs: 'C#',
|
||||
* css: 'CSS'
|
||||
* }
|
||||
*
|
||||
* More information on how to change the list of languages is available
|
||||
* in the {@glink guide/dev_codesnippet#changing-supported-languages Code Snippet documentation}.
|
||||
*
|
||||
* @property {Object} languages
|
||||
*/
|
||||
|
||||
/**
|
||||
* A flag which indicates whether the highlighter is ready to do jobs
|
||||
* from the {@link #queue}.
|
||||
*
|
||||
* @readonly
|
||||
* @property {Boolean} ready
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the {@link #highlighter}. If the highlighter is not ready, it defers the job ({@link #queue})
|
||||
* and executes it when the highlighter is {@link #ready}.
|
||||
*
|
||||
* @param {String} code Code to be formatted.
|
||||
* @param {String} lang Language to be used ({@link CKEDITOR.config#codeSnippet_languages}).
|
||||
* @param {Function} callback Function which accepts highlighted String as an argument.
|
||||
*/
|
||||
Highlighter.prototype.highlight = function() {
|
||||
var arg = arguments;
|
||||
|
||||
// Highlighter is ready – do it now.
|
||||
if ( this.ready )
|
||||
this.highlighter.apply( this, arg );
|
||||
// Queue the job. It will be done once ready.
|
||||
else {
|
||||
this.queue.push( function() {
|
||||
this.highlighter.apply( this, arg );
|
||||
} );
|
||||
}
|
||||
};
|
||||
|
||||
// Encapsulates snippet widget registration code.
|
||||
// @param {CKEDITOR.editor} editor
|
||||
function registerWidget( editor ) {
|
||||
var codeClass = editor.config.codeSnippet_codeClass,
|
||||
newLineRegex = /\r?\n/g,
|
||||
textarea = new CKEDITOR.dom.element( 'textarea' ),
|
||||
lang = editor.lang.codesnippet;
|
||||
|
||||
editor.widgets.add( 'codeSnippet', {
|
||||
allowedContent: 'pre; code(language-*)',
|
||||
// Actually we need both - pre and code, but ACF does not make it possible
|
||||
// to defire required content with "and" operator.
|
||||
requiredContent: 'pre',
|
||||
styleableElements: 'pre',
|
||||
template: '<pre><code class="' + codeClass + '"></code></pre>',
|
||||
dialog: 'codeSnippet',
|
||||
pathName: lang.pathName,
|
||||
mask: true,
|
||||
|
||||
parts: {
|
||||
pre: 'pre',
|
||||
code: 'code'
|
||||
},
|
||||
|
||||
highlight: function() {
|
||||
var that = this,
|
||||
widgetData = this.data,
|
||||
callback = function( formatted ) {
|
||||
// IE8 (not supported browser) have issue with new line chars, when using innerHTML.
|
||||
// It will simply strip it.
|
||||
that.parts.code.setHtml( isBrowserSupported ?
|
||||
formatted : formatted.replace( newLineRegex, '<br>' ) );
|
||||
};
|
||||
|
||||
// Set plain code first, so even if custom handler will not call it the code will be there.
|
||||
callback( CKEDITOR.tools.htmlEncode( widgetData.code ) );
|
||||
|
||||
// Call higlighter to apply its custom highlighting.
|
||||
editor._.codesnippet.highlighter.highlight( widgetData.code, widgetData.lang, function( formatted ) {
|
||||
editor.fire( 'lockSnapshot' );
|
||||
callback( formatted );
|
||||
editor.fire( 'unlockSnapshot' );
|
||||
} );
|
||||
},
|
||||
|
||||
data: function() {
|
||||
var newData = this.data,
|
||||
oldData = this.oldData;
|
||||
|
||||
if ( newData.code )
|
||||
this.parts.code.setHtml( CKEDITOR.tools.htmlEncode( newData.code ) );
|
||||
|
||||
// Remove old .language-* class.
|
||||
if ( oldData && newData.lang != oldData.lang )
|
||||
this.parts.code.removeClass( 'language-' + oldData.lang );
|
||||
|
||||
// Lang needs to be specified in order to apply formatting.
|
||||
if ( newData.lang ) {
|
||||
// Apply new .language-* class.
|
||||
this.parts.code.addClass( 'language-' + newData.lang );
|
||||
|
||||
this.highlight();
|
||||
}
|
||||
|
||||
// Save oldData.
|
||||
this.oldData = CKEDITOR.tools.copy( newData );
|
||||
},
|
||||
|
||||
// Upcasts <pre><code [class="language-*"]>...</code></pre>
|
||||
upcast: function( el, data ) {
|
||||
if ( el.name != 'pre' )
|
||||
return;
|
||||
|
||||
var childrenArray = getNonEmptyChildren( el ),
|
||||
code;
|
||||
|
||||
if ( childrenArray.length != 1 || ( code = childrenArray[ 0 ] ).name != 'code' )
|
||||
return;
|
||||
|
||||
// Upcast <code> with text only: https://dev.ckeditor.com/ticket/11926#comment:4
|
||||
if ( code.children.length != 1 || code.children[ 0 ].type != CKEDITOR.NODE_TEXT )
|
||||
return;
|
||||
|
||||
// Read language-* from <code> class attribute.
|
||||
var matchResult = editor._.codesnippet.langsRegex.exec( code.attributes[ 'class' ] );
|
||||
|
||||
if ( matchResult )
|
||||
data.lang = matchResult[ 1 ];
|
||||
|
||||
// Use textarea to decode HTML entities (https://dev.ckeditor.com/ticket/11926).
|
||||
textarea.setHtml( code.getHtml() );
|
||||
data.code = textarea.getValue();
|
||||
|
||||
code.addClass( codeClass );
|
||||
|
||||
return el;
|
||||
},
|
||||
|
||||
// Downcasts to <pre><code [class="language-*"]>...</code></pre>
|
||||
downcast: function( el ) {
|
||||
var code = el.getFirst( 'code' );
|
||||
|
||||
// Remove pretty formatting from <code>...</code>.
|
||||
code.children.length = 0;
|
||||
|
||||
// Remove config#codeSnippet_codeClass.
|
||||
code.removeClass( codeClass );
|
||||
|
||||
// Set raw text inside <code>...</code>.
|
||||
code.add( new CKEDITOR.htmlParser.text( CKEDITOR.tools.htmlEncode( this.data.code ) ) );
|
||||
|
||||
return el;
|
||||
}
|
||||
} );
|
||||
|
||||
// Returns an **array** of child elements, with whitespace-only text nodes
|
||||
// filtered out.
|
||||
// @param {CKEDITOR.htmlParser.element} parentElement
|
||||
// @return Array - array of CKEDITOR.htmlParser.node
|
||||
var whitespaceOnlyRegex = /^[\s\n\r]*$/;
|
||||
|
||||
function getNonEmptyChildren( parentElement ) {
|
||||
var ret = [],
|
||||
preChildrenList = parentElement.children,
|
||||
curNode;
|
||||
|
||||
// Filter out empty text nodes.
|
||||
for ( var i = preChildrenList.length - 1; i >= 0; i-- ) {
|
||||
curNode = preChildrenList[ i ];
|
||||
|
||||
if ( curNode.type != CKEDITOR.NODE_TEXT || !curNode.value.match( whitespaceOnlyRegex ) )
|
||||
ret.push( curNode );
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
} )();
|
||||
|
||||
/**
|
||||
* A CSS class of the `<code>` element used internally for styling
|
||||
* (by default [highlight.js](http://highlightjs.org) themes, see
|
||||
* {@link CKEDITOR.config#codeSnippet_theme config.codeSnippet_theme}),
|
||||
* which means that it is **not present** in the editor output data.
|
||||
*
|
||||
* // Changes the class to "myCustomClass".
|
||||
* config.codeSnippet_codeClass = 'myCustomClass';
|
||||
*
|
||||
* **Note**: The class might need to be changed when you are using a custom
|
||||
* highlighter (the default is [highlight.js](http://highlightjs.org)).
|
||||
* See {@link CKEDITOR.plugins.codesnippet.highlighter} to read more.
|
||||
*
|
||||
* Read more in the {@glink guide/dev_codesnippet documentation}
|
||||
* and see the {@glink examples/codesnippet example}.
|
||||
*
|
||||
* @since 4.4
|
||||
* @cfg {String} [codeSnippet_codeClass='hljs']
|
||||
* @member CKEDITOR.config
|
||||
*/
|
||||
CKEDITOR.config.codeSnippet_codeClass = 'hljs';
|
||||
|
||||
/**
|
||||
* Restricts languages available in the "Code Snippet" dialog window.
|
||||
* An empty value is always added to the list.
|
||||
*
|
||||
* **Note**: If using a custom highlighter library (the default is [highlight.js](http://highlightjs.org)),
|
||||
* you may need to refer to external documentation to set `config.codeSnippet_languages` properly.
|
||||
*
|
||||
* Read more in the [documentation](#!/guide/dev_codesnippet-section-changing-supported-languages)
|
||||
* and see the {@glink examples/codesnippet example}.
|
||||
*
|
||||
* // Restricts languages to JavaScript and PHP.
|
||||
* config.codeSnippet_languages = {
|
||||
* javascript: 'JavaScript',
|
||||
* php: 'PHP'
|
||||
* };
|
||||
*
|
||||
* @since 4.4
|
||||
* @cfg {Object} [codeSnippet_languages=null]
|
||||
* @member CKEDITOR.config
|
||||
*/
|
||||
|
||||
/**
|
||||
* A theme used to render code snippets. See [available themes](http://highlightjs.org/static/test.html).
|
||||
*
|
||||
* **Note**: This will only work with the default highlighter
|
||||
* ([highlight.js](http://highlightjs.org/static/test.html)).
|
||||
*
|
||||
* Read more in the [documentation](#!/guide/dev_codesnippet-section-changing-highlighter-theme)
|
||||
* and see the {@glink examples/codesnippet example}.
|
||||
*
|
||||
* // Changes the theme to "pojoaque".
|
||||
* config.codeSnippet_theme = 'pojoaque';
|
||||
*
|
||||
* @since 4.4
|
||||
* @cfg {String} [codeSnippet_theme='default']
|
||||
* @member CKEDITOR.config
|
||||
*/
|
||||
CKEDITOR.config.codeSnippet_theme = 'default';
|
||||
@@ -1,239 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Code Snippet — CKEditor Sample</title>
|
||||
<script src="../../../ckeditor.js"></script>
|
||||
<link href="../../../samples/old/sample.css" rel="stylesheet">
|
||||
<!-- %REMOVE_LINE%
|
||||
<link href="../../../plugins/codesnippet/lib/highlight/styles/monokai_sublime.css" rel="stylesheet">
|
||||
%REMOVE_LINE% -->
|
||||
<link href="../lib/highlight/styles/monokai_sublime.css" rel="stylesheet"><!-- %REMOVE_LINE% -->
|
||||
<meta name="ckeditor-sample-name" content="Code Snippet plugin">
|
||||
<meta name="ckeditor-sample-group" content="Plugins">
|
||||
<meta name="ckeditor-sample-description" content="View and modify code using the Code Snippet plugin.">
|
||||
<meta name="ckeditor-sample-isnew" content="1">
|
||||
<style>
|
||||
|
||||
#editable
|
||||
{
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="../../../samples/old/index.html">CKEditor Samples</a> » Code Snippet Plugin
|
||||
</h1>
|
||||
<div class="warning deprecated">
|
||||
This sample is not maintained anymore. Check out its <a href="https://ckeditor.com/docs/ckeditor4/latest/examples/codesnippet.html">brand new version in CKEditor Examples</a>.
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>
|
||||
This editor is using the <strong><a href="https://ckeditor.com/cke4/addon/codesnippet">Code Snippet</a></strong> plugin which introduces beautiful code snippets.
|
||||
By default the <code>codesnippet</code> plugin depends on the built-in client-side syntax highlighting
|
||||
library <a href="http://highlightjs.org">highlight.js</a>.
|
||||
</p>
|
||||
<p>
|
||||
You can adjust the appearance of code snippets using the <code><a href="https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-codeSnippet_theme">codeSnippet_theme</a></code> configuration variable
|
||||
(see <a href="http://highlightjs.org/static/test.html">available themes</a>).
|
||||
</p>
|
||||
<p>
|
||||
Select theme: <select id="select"></select>
|
||||
</p>
|
||||
<p>
|
||||
The CKEditor instance below was created by using the following configuration settings:
|
||||
</p>
|
||||
|
||||
<pre class="samples" id="sampleConfig">
|
||||
CKEDITOR.replace( 'editor1', {
|
||||
<strong>extraPlugins: 'codesnippet',</strong>
|
||||
codeSnippet_theme: 'monokai_sublime'
|
||||
} );
|
||||
</pre>
|
||||
|
||||
<p id="ie8-warning">
|
||||
Please note that this plugin is not compatible with Internet Explorer 8.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<textarea id="editor1">
|
||||
<p>JavaScript code:</p>
|
||||
|
||||
<pre>
|
||||
<code class="language-javascript">function isEmpty( object ) {
|
||||
for ( var i in object ) {
|
||||
if ( object.hasOwnProperty( i ) )
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}</code></pre>
|
||||
|
||||
<p>SQL query:</p>
|
||||
|
||||
<pre>
|
||||
<code class="language-sql">SELECT cust.id FROM cust LEFT JOIN loc ON ( cust.loc_id = loc.id ) WHERE cust.type IN ( 1, 2 );</code></pre>
|
||||
|
||||
<p>Unknown markup:</p>
|
||||
|
||||
<pre>
|
||||
<code> ________________
|
||||
/ \
|
||||
| How about moo? | ^__^
|
||||
\________________/ (oo)\_______
|
||||
\ (__)\ )\/\
|
||||
||----w |
|
||||
|| ||
|
||||
</code></pre>
|
||||
</textarea>
|
||||
|
||||
<h2>Inline editor</h2>
|
||||
|
||||
<div class="description">
|
||||
<p>
|
||||
The following sample shows the <strong>Code Snippet</strong> plugin running inside
|
||||
an inline CKEditor instance. The CKEditor instance below was created by using the following configuration settings:
|
||||
</p>
|
||||
|
||||
<pre class="samples">
|
||||
CKEDITOR.inline( 'editable', {
|
||||
<strong>extraPlugins: 'codesnippet'</strong>
|
||||
} );
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
<strong>Note</strong>: The <a href="http://highlightjs.org/static/test.html">highlight.js themes</a>
|
||||
must be loaded manually to be applied inside an inline editor instance, as the
|
||||
<code>codeSnippet_theme</code> setting will not work in that case.
|
||||
You need to include the stylesheet in the <code><head></code> section of the page, for example:
|
||||
</p>
|
||||
|
||||
<pre class="samples">
|
||||
<head>
|
||||
...
|
||||
<link href="path/to/highlight.js/styles/monokai_sublime.css" rel="stylesheet">
|
||||
</head>
|
||||
</pre>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="editable" contenteditable="true">
|
||||
|
||||
<p>JavaScript code:</p>
|
||||
|
||||
<pre><code class="language-javascript">function isEmpty( object ) {
|
||||
for ( var i in object ) {
|
||||
if ( object.hasOwnProperty( i ) )
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}</code></pre>
|
||||
|
||||
<p>SQL query:</p>
|
||||
|
||||
<pre><code class="language-sql">SELECT cust.id, cust.name, loc.city FROM cust LEFT JOIN loc ON ( cust.loc_id = loc.id ) WHERE cust.type IN ( 1, 2 );</code></pre>
|
||||
|
||||
<p>Unknown markup:</p>
|
||||
|
||||
<pre><code> ________________
|
||||
/ \
|
||||
| How about moo? | ^__^
|
||||
\________________/ (oo)\_______
|
||||
\ (__)\ )\/\
|
||||
||----w |
|
||||
|| ||
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
<h2>Server-side Highlighting and Custom Highlighting Engines</h2>
|
||||
|
||||
<p>
|
||||
The <a href="https://ckeditor.com/cke4/addon/codesnippetgeshi"><strong>Code Snippet GeSHi</strong></a> plugin is an
|
||||
extension of the <strong>Code Snippet</strong> plugin which uses a server-side highligter.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
It also is possible to replace the default highlighter with any library using
|
||||
the <a href="https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_codesnippet_highlighter.html">Highlighter API</a>
|
||||
and the <a href="https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_codesnippet.html#method-setHighlighter"><code>editor.plugins.codesnippet.setHighlighter()</code></a> method.
|
||||
</p>
|
||||
|
||||
<script>
|
||||
( function() {
|
||||
CKEDITOR.disableAutoInline = true;
|
||||
|
||||
var config = {
|
||||
extraPlugins: 'codesnippet',
|
||||
toolbar: [
|
||||
[ 'Source' ], [ 'Undo', 'Redo' ], [ 'Bold', 'Italic', 'Underline' ], [ 'CodeSnippet' ]
|
||||
],
|
||||
codeSnippet_theme: 'monokai_sublime',
|
||||
height: 400
|
||||
};
|
||||
|
||||
CKEDITOR.replace( 'editor1', config );
|
||||
|
||||
CKEDITOR.inline( 'editable', CKEDITOR.tools.extend( {}, config, {
|
||||
extraPlugins: 'codesnippet'
|
||||
}, true ) );
|
||||
|
||||
initThemeChange();
|
||||
|
||||
function initThemeChange() {
|
||||
var templates = [
|
||||
'monokai_sublime', 'default', 'arta', 'ascetic', 'atelier-dune.dark', 'atelier-dune.light', 'atelier-forest.dark', 'atelier-forest.light', 'atelier-heath.dark', 'atelier-heath.light', 'atelier-lakeside.dark', 'atelier-lakeside.light', 'atelier-seaside.dark', 'atelier-seaside.light', 'brown_paper', 'dark', 'docco', 'far', 'foundation', 'github', 'googlecode', 'idea', 'ir_black', 'magula', 'mono-blue', 'monokai', 'obsidian', 'paraiso.dark', 'paraiso.light', 'pojoaque', 'railscasts', 'rainbow', 'school_book', 'solarized_dark', 'solarized_light', 'sunburst', 'tomorrow-night-blue', 'tomorrow-night-bright', 'tomorrow-night-eighties', 'tomorrow-night', 'tomorrow', 'vs', 'xcode', 'zenburn'
|
||||
],
|
||||
pre = CKEDITOR.document.getById( 'sampleConfig' ),
|
||||
select = CKEDITOR.document.getById( 'select' ),
|
||||
codeTemplate = 'CKEDITOR.replace( \'editor1\', {\n' +
|
||||
' <strong>extraPlugins: \'codesnippet\',</strong>\n' +
|
||||
' codeSnippet_theme: \'{tpl}\'\n' +
|
||||
'} );',
|
||||
name, option;
|
||||
|
||||
while ( ( name = templates.shift() ) ) {
|
||||
option = CKEDITOR.document.createElement( 'option', {
|
||||
attributes: {
|
||||
value: name
|
||||
}
|
||||
} );
|
||||
|
||||
option.setText( name );
|
||||
select.append( option );
|
||||
}
|
||||
|
||||
select.$.onchange = function() {
|
||||
if ( CKEDITOR.instances.editor1 )
|
||||
CKEDITOR.instances.editor1.destroy();
|
||||
|
||||
CKEDITOR.replace( 'editor1', CKEDITOR.tools.extend( {}, config, {
|
||||
codeSnippet_theme: this.value
|
||||
}, true ) );
|
||||
|
||||
pre.setHtml( codeTemplate.replace( '{tpl}', this.value ) );
|
||||
};
|
||||
}
|
||||
|
||||
if ( CKEDITOR.env.ie && CKEDITOR.env.version == 8 )
|
||||
CKEDITOR.document.getById( 'ie8-warning' ).addClass( 'warning' );
|
||||
}() );
|
||||
</script>
|
||||
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="https://ckeditor.com/">https://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2019, <a class="samples" href="https://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user