Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Merge into develop-exo - EXO-65722,EXO-65716,EXO-65704,EXO-65695 #528

Merged
merged 4 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ abstract public class HTMLSanitizer {
.allowAttributes("noresize")
.matching(Pattern.compile("(?i)noresize"))
.onElements("table")
.allowAttributes("summary")
.onElements("table")
.allowAttributes("background")
.matching(ONSITE_URL)
.onElements("td",
Expand Down Expand Up @@ -346,6 +348,7 @@ abstract public class HTMLSanitizer {
.globally()
.allowAttributes("v-identity-popover")
.globally()
.allowElements("caption")
.toFactory();

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/**
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/

'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'
}
]
}
]
};
} );
}() );
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/

CKEDITOR.plugins.setLang( 'codesnippet', 'ar', {
button: 'أدمج قصاصة الشيفرة',
codeContents: 'محتوى الشيفرة',
emptySnippetError: 'قصاصة الشيفرة لايمكن أن تكون فارغة.',
language: 'لغة',
title: 'قصاصة الشيفرة',
pathName: 'قصاصة الشيفرة'
} );
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/

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ı'
} );
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/

CKEDITOR.plugins.setLang( 'codesnippet', 'bg', {
button: 'Въвеждане на блок с код',
codeContents: 'Съдържание на кода',
emptySnippetError: 'Блока с код не може да бъде празен.',
language: 'Език',
title: 'Блок с код',
pathName: 'блок с код'
} );
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/

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'
} );
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/

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'
} );
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/

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'
} );
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/

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'
} );
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/

CKEDITOR.plugins.setLang( 'codesnippet', 'de', {
button: 'Codeschnipsel einfügen',
codeContents: 'Codeinhalt',
emptySnippetError: 'Ein Codeschnipsel darf nicht leer sein.',
language: 'Sprache',
title: 'Codeschnipsel',
pathName: 'Codeschnipsel'
} );
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/

CKEDITOR.plugins.setLang( 'codesnippet', 'el', {
button: 'Εισαγωγή Αποσπάσματος Κώδικα',
codeContents: 'Περιεχόμενο κώδικα',
emptySnippetError: 'Δεν γίνεται να είναι κενά τα αποσπάσματα κώδικα.',
language: 'Γλώσσα',
title: 'Απόσπασμα κώδικα',
pathName: 'απόσπασμα κώδικα'
} );
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/

CKEDITOR.plugins.setLang( 'codesnippet', 'en-au', {
button: 'Insert Code Snippet',
codeContents: 'Code content',
emptySnippetError: 'A code snippet cannot be empty.',
language: 'Language',
title: 'Code snippet',
pathName: 'code snippet'
} );
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/

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'
} );
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/

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'
} );
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/

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'
} );
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/

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'
} );
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/

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'
} );
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/

CKEDITOR.plugins.setLang( 'codesnippet', 'et', {
button: 'Koodijupi sisestamine',
codeContents: 'Koodi sisu',
emptySnippetError: 'Koodijupp ei saa olla tühi.',
language: 'Keel',
title: 'Koodijupp',
pathName: 'koodijupp'
} );
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/

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'
} );
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/

CKEDITOR.plugins.setLang( 'codesnippet', 'fa', {
button: 'قرار دادن کد قطعه',
codeContents: 'محتوای کد',
emptySnippetError: 'کد نمی تواند خالی باشد.',
language: 'زبان',
title: 'کد قطعه',
pathName: 'کد قطعه'
} );
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/

CKEDITOR.plugins.setLang( 'codesnippet', 'fi', {
button: 'Lisää koodileike',
codeContents: 'Koodisisältö',
emptySnippetError: 'Koodileike ei voi olla tyhjä.',
language: 'Kieli',
title: 'Koodileike',
pathName: 'koodileike'
} );
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/

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
} );
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
*/

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'
} );
Loading