forked from Wavyzz/dolibarr
New: Update ckeditor to version 4 (part 1)
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'af', {
|
||||
label: 'Styl',
|
||||
panelTitle: 'Opmaak style',
|
||||
panelTitle1: 'Blok style',
|
||||
panelTitle2: 'Inlyn style',
|
||||
panelTitle3: 'Objek style'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'ar', {
|
||||
label: 'أنماط',
|
||||
panelTitle: 'أنماط التنسيق',
|
||||
panelTitle1: 'أنماط الفقرة',
|
||||
panelTitle2: 'أنماط مضمنة',
|
||||
panelTitle3: 'أنماط الكائن'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'bg', {
|
||||
label: 'Стилове',
|
||||
panelTitle: 'Стилове за форматиране',
|
||||
panelTitle1: 'Блокови стилове',
|
||||
panelTitle2: 'Вътрешни стилове',
|
||||
panelTitle3: 'Обектни стилове'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'bn', {
|
||||
label: 'স্টাইল',
|
||||
panelTitle: 'Formatting Styles', // MISSING
|
||||
panelTitle1: 'Block Styles', // MISSING
|
||||
panelTitle2: 'Inline Styles', // MISSING
|
||||
panelTitle3: 'Object Styles' // MISSING
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'bs', {
|
||||
label: 'Stil',
|
||||
panelTitle: 'Formatting Styles', // MISSING
|
||||
panelTitle1: 'Block Styles', // MISSING
|
||||
panelTitle2: 'Inline Styles', // MISSING
|
||||
panelTitle3: 'Object Styles' // MISSING
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'ca', {
|
||||
label: 'Estil',
|
||||
panelTitle: 'Estils de format',
|
||||
panelTitle1: 'Estils de bloc',
|
||||
panelTitle2: 'Estils incrustats',
|
||||
panelTitle3: 'Estils d\'objecte'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'cs', {
|
||||
label: 'Styl',
|
||||
panelTitle: 'Formátovací styly',
|
||||
panelTitle1: 'Blokové styly',
|
||||
panelTitle2: 'Řádkové styly',
|
||||
panelTitle3: 'Objektové styly'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'cy', {
|
||||
label: 'Arddulliau',
|
||||
panelTitle: 'Arddulliau Fformatio',
|
||||
panelTitle1: 'Arddulliau Bloc',
|
||||
panelTitle2: 'Arddulliau Mewnol',
|
||||
panelTitle3: 'Arddulliau Gwrthrych'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'da', {
|
||||
label: 'Typografi',
|
||||
panelTitle: 'Formattering på stylesheet',
|
||||
panelTitle1: 'Block typografi',
|
||||
panelTitle2: 'Inline typografi',
|
||||
panelTitle3: 'Object typografi'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'de', {
|
||||
label: 'Stil',
|
||||
panelTitle: 'Formatierungenstil',
|
||||
panelTitle1: 'Block Stilart',
|
||||
panelTitle2: 'Inline Stilart',
|
||||
panelTitle3: 'Objekt Stilart'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'el', {
|
||||
label: 'Μορφές',
|
||||
panelTitle: 'Στυλ Μορφοποίησης',
|
||||
panelTitle1: 'Στυλ Τμημάτων',
|
||||
panelTitle2: 'Στυλ Εν Σειρά',
|
||||
panelTitle3: 'Στυλ Αντικειμένων'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'en-au', {
|
||||
label: 'Styles',
|
||||
panelTitle: 'Formatting Styles', // MISSING
|
||||
panelTitle1: 'Block Styles',
|
||||
panelTitle2: 'Inline Styles',
|
||||
panelTitle3: 'Object Styles'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'en-ca', {
|
||||
label: 'Styles',
|
||||
panelTitle: 'Formatting Styles', // MISSING
|
||||
panelTitle1: 'Block Styles',
|
||||
panelTitle2: 'Inline Styles',
|
||||
panelTitle3: 'Object Styles'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'en-gb', {
|
||||
label: 'Styles',
|
||||
panelTitle: 'Formatting Styles',
|
||||
panelTitle1: 'Block Styles',
|
||||
panelTitle2: 'Inline Styles',
|
||||
panelTitle3: 'Object Styles'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'en', {
|
||||
label: 'Styles',
|
||||
panelTitle: 'Formatting Styles',
|
||||
panelTitle1: 'Block Styles',
|
||||
panelTitle2: 'Inline Styles',
|
||||
panelTitle3: 'Object Styles'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'eo', {
|
||||
label: 'Stiloj',
|
||||
panelTitle: 'Stiloj pri enpaĝigo',
|
||||
panelTitle1: 'Stiloj de blokoj',
|
||||
panelTitle2: 'Enliniaj Stiloj',
|
||||
panelTitle3: 'Stiloj de objektoj'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'es', {
|
||||
label: 'Estilo',
|
||||
panelTitle: 'Estilos para formatear',
|
||||
panelTitle1: 'Estilos de párrafo',
|
||||
panelTitle2: 'Estilos de carácter',
|
||||
panelTitle3: 'Estilos de objeto'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'et', {
|
||||
label: 'Stiil',
|
||||
panelTitle: 'Vormindusstiilid',
|
||||
panelTitle1: 'Blokkstiilid',
|
||||
panelTitle2: 'Reasisesed stiilid',
|
||||
panelTitle3: 'Objektistiilid'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'eu', {
|
||||
label: 'Estiloa',
|
||||
panelTitle: 'Formatu Estiloak',
|
||||
panelTitle1: 'Bloke Estiloak',
|
||||
panelTitle2: 'Inline Estiloak',
|
||||
panelTitle3: 'Objektu Estiloak'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'fa', {
|
||||
label: 'سبک',
|
||||
panelTitle: 'سبکهای قالببندی',
|
||||
panelTitle1: 'سبکهای بلوک',
|
||||
panelTitle2: 'سبکهای درونخطی',
|
||||
panelTitle3: 'سبکهای شیء'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'fi', {
|
||||
label: 'Tyyli',
|
||||
panelTitle: 'Muotoilujen tyylit',
|
||||
panelTitle1: 'Lohkojen tyylit',
|
||||
panelTitle2: 'Rivinsisäiset tyylit',
|
||||
panelTitle3: 'Objektien tyylit'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'fo', {
|
||||
label: 'Typografi',
|
||||
panelTitle: 'Formatterings stílir',
|
||||
panelTitle1: 'Blokk stílir',
|
||||
panelTitle2: 'Inline stílir',
|
||||
panelTitle3: 'Object stílir'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'fr-ca', {
|
||||
label: 'Styles',
|
||||
panelTitle: 'Styles de formattage',
|
||||
panelTitle1: 'Styles de block',
|
||||
panelTitle2: 'Styles en ligne',
|
||||
panelTitle3: 'Styles d\'objet'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'fr', {
|
||||
label: 'Styles',
|
||||
panelTitle: 'Styles de mise en page',
|
||||
panelTitle1: 'Styles de blocs',
|
||||
panelTitle2: 'Styles en ligne',
|
||||
panelTitle3: 'Styles d\'objet'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'gl', {
|
||||
label: 'Estilos',
|
||||
panelTitle: 'Estilos de formatando',
|
||||
panelTitle1: 'Estilos de bloque',
|
||||
panelTitle2: 'Estilos de carácter',
|
||||
panelTitle3: 'Estilos de obxecto'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'gu', {
|
||||
label: 'શૈલી/રીત',
|
||||
panelTitle: 'ફોર્મેટ ',
|
||||
panelTitle1: 'બ્લોક ',
|
||||
panelTitle2: 'ઈનલાઈન ',
|
||||
panelTitle3: 'ઓબ્જેક્ટ પદ્ધતિ'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'he', {
|
||||
label: 'סגנון',
|
||||
panelTitle: 'סגנונות פורמט',
|
||||
panelTitle1: 'סגנונות בלוק',
|
||||
panelTitle2: 'סגנונות רצף',
|
||||
panelTitle3: 'סגנונות אובייקט'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'hi', {
|
||||
label: 'स्टाइल',
|
||||
panelTitle: 'Formatting Styles', // MISSING
|
||||
panelTitle1: 'Block Styles', // MISSING
|
||||
panelTitle2: 'Inline Styles', // MISSING
|
||||
panelTitle3: 'Object Styles' // MISSING
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'hr', {
|
||||
label: 'Stil',
|
||||
panelTitle: 'Stilovi formatiranja',
|
||||
panelTitle1: 'Block stilovi',
|
||||
panelTitle2: 'Inline stilovi',
|
||||
panelTitle3: 'Object stilovi'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'hu', {
|
||||
label: 'Stílus',
|
||||
panelTitle: 'Formázási stílusok',
|
||||
panelTitle1: 'Blokk stílusok',
|
||||
panelTitle2: 'Inline stílusok',
|
||||
panelTitle3: 'Objektum stílusok'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'id', {
|
||||
label: 'Gaya',
|
||||
panelTitle: 'Formatting Styles', // MISSING
|
||||
panelTitle1: 'Block Styles', // MISSING
|
||||
panelTitle2: 'Inline Styles', // MISSING
|
||||
panelTitle3: 'Object Styles' // MISSING
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'is', {
|
||||
label: 'Stílflokkur',
|
||||
panelTitle: 'Formatting Styles', // MISSING
|
||||
panelTitle1: 'Block Styles', // MISSING
|
||||
panelTitle2: 'Inline Styles', // MISSING
|
||||
panelTitle3: 'Object Styles' // MISSING
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'it', {
|
||||
label: 'Stili',
|
||||
panelTitle: 'Stili di formattazione',
|
||||
panelTitle1: 'Stili per blocchi',
|
||||
panelTitle2: 'Stili in linea',
|
||||
panelTitle3: 'Stili per oggetti'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'ja', {
|
||||
label: 'スタイル',
|
||||
panelTitle: 'スタイル',
|
||||
panelTitle1: 'ブロックスタイル',
|
||||
panelTitle2: 'インラインスタイル',
|
||||
panelTitle3: 'オブジェクトスタイル'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'ka', {
|
||||
label: 'სტილები',
|
||||
panelTitle: 'ფორმატირების სტილები',
|
||||
panelTitle1: 'არის სტილები',
|
||||
panelTitle2: 'თანდართული სტილები',
|
||||
panelTitle3: 'ობიექტის სტილები'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'km', {
|
||||
label: 'រចនាបថ',
|
||||
panelTitle: 'ទ្រង់ទ្រាយរចនាបថ',
|
||||
panelTitle1: 'រចនាបថប្លក់',
|
||||
panelTitle2: 'រចនាបថក្នុងជួរ',
|
||||
panelTitle3: 'រចនាបថវត្ថុ'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'ko', {
|
||||
label: '스타일',
|
||||
panelTitle: '전체 구성 스타일',
|
||||
panelTitle1: '블록 스타일',
|
||||
panelTitle2: '인라인 스타일',
|
||||
panelTitle3: '오브젝트 스타일'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'ku', {
|
||||
label: 'شێواز',
|
||||
panelTitle: 'شێوازی ڕازاندنەوە',
|
||||
panelTitle1: 'شێوازی خشت',
|
||||
panelTitle2: 'شێوازی ناوهێڵ',
|
||||
panelTitle3: 'شێوازی بەرکار'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'lt', {
|
||||
label: 'Stilius',
|
||||
panelTitle: 'Stilių formatavimas',
|
||||
panelTitle1: 'Blokų stiliai',
|
||||
panelTitle2: 'Vidiniai stiliai',
|
||||
panelTitle3: 'Objektų stiliai'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'lv', {
|
||||
label: 'Stils',
|
||||
panelTitle: 'Formatēšanas stili',
|
||||
panelTitle1: 'Bloka stili',
|
||||
panelTitle2: 'iekļautie stili',
|
||||
panelTitle3: 'Objekta stili'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'mk', {
|
||||
label: 'Styles',
|
||||
panelTitle: 'Formatting Styles', // MISSING
|
||||
panelTitle1: 'Block Styles', // MISSING
|
||||
panelTitle2: 'Inline Styles', // MISSING
|
||||
panelTitle3: 'Object Styles' // MISSING
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'mn', {
|
||||
label: 'Загвар',
|
||||
panelTitle: 'Загвар хэлбэржүүлэх',
|
||||
panelTitle1: 'Block Styles', // MISSING
|
||||
panelTitle2: 'Inline Styles', // MISSING
|
||||
panelTitle3: 'Object Styles' // MISSING
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'ms', {
|
||||
label: 'Stail',
|
||||
panelTitle: 'Formatting Styles', // MISSING
|
||||
panelTitle1: 'Block Styles', // MISSING
|
||||
panelTitle2: 'Inline Styles', // MISSING
|
||||
panelTitle3: 'Object Styles' // MISSING
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'nb', {
|
||||
label: 'Stil',
|
||||
panelTitle: 'Stilformater',
|
||||
panelTitle1: 'Blokkstiler',
|
||||
panelTitle2: 'Inlinestiler',
|
||||
panelTitle3: 'Objektstiler'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'nl', {
|
||||
label: 'Stijl',
|
||||
panelTitle: 'Opmaakstijlen',
|
||||
panelTitle1: 'Blok stijlen',
|
||||
panelTitle2: 'Inline stijlen',
|
||||
panelTitle3: 'Object stijlen'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'no', {
|
||||
label: 'Stil',
|
||||
panelTitle: 'Stilformater',
|
||||
panelTitle1: 'Blokkstiler',
|
||||
panelTitle2: 'Inlinestiler',
|
||||
panelTitle3: 'Objektstiler'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'pl', {
|
||||
label: 'Styl',
|
||||
panelTitle: 'Style formatujące',
|
||||
panelTitle1: 'Style blokowe',
|
||||
panelTitle2: 'Style liniowe',
|
||||
panelTitle3: 'Style obiektowe'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'pt-br', {
|
||||
label: 'Estilo',
|
||||
panelTitle: 'Estilos de Formatação',
|
||||
panelTitle1: 'Estilos de bloco',
|
||||
panelTitle2: 'Estilos de texto corrido',
|
||||
panelTitle3: 'Estilos de objeto'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'pt', {
|
||||
label: 'Estilos',
|
||||
panelTitle: 'Estilos de Formatação',
|
||||
panelTitle1: 'Estilos de Bloco',
|
||||
panelTitle2: 'Estilos de Linha',
|
||||
panelTitle3: 'Estilos de Objeto'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'ro', {
|
||||
label: 'Stil',
|
||||
panelTitle: 'Formatarea stilurilor',
|
||||
panelTitle1: 'Block Styles', // MISSING
|
||||
panelTitle2: 'Inline Styles', // MISSING
|
||||
panelTitle3: 'Object Styles' // MISSING
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'ru', {
|
||||
label: 'Стили',
|
||||
panelTitle: 'Стили форматирования',
|
||||
panelTitle1: 'Стили блока',
|
||||
panelTitle2: 'Стили элемента',
|
||||
panelTitle3: 'Стили объекта'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'si', {
|
||||
label: 'විලාසය',
|
||||
panelTitle: 'Formatting Styles', // MISSING
|
||||
panelTitle1: 'Block Styles', // MISSING
|
||||
panelTitle2: 'Inline Styles', // MISSING
|
||||
panelTitle3: 'Object Styles' // MISSING
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'sk', {
|
||||
label: 'Štýly',
|
||||
panelTitle: 'Formátovanie štýlov',
|
||||
panelTitle1: 'Štýly bloku',
|
||||
panelTitle2: 'Vnútroriadkové (inline) štýly',
|
||||
panelTitle3: 'Štýly objeku'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'sl', {
|
||||
label: 'Slog',
|
||||
panelTitle: 'Oblikovalni Stili',
|
||||
panelTitle1: 'Slogi odstavkov',
|
||||
panelTitle2: 'Slogi besedila',
|
||||
panelTitle3: 'Slogi objektov'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'sq', {
|
||||
label: 'Stil',
|
||||
panelTitle: 'Stilet e Formatimit',
|
||||
panelTitle1: 'Stilet e Bllokut',
|
||||
panelTitle2: 'Stili i Brendshëm',
|
||||
panelTitle3: 'Stilet e Objektit'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'sr-latn', {
|
||||
label: 'Stil',
|
||||
panelTitle: 'Formatting Styles', // MISSING
|
||||
panelTitle1: 'Block Styles', // MISSING
|
||||
panelTitle2: 'Inline Styles', // MISSING
|
||||
panelTitle3: 'Object Styles' // MISSING
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'sr', {
|
||||
label: 'Стил',
|
||||
panelTitle: 'Formatting Styles', // MISSING
|
||||
panelTitle1: 'Block Styles', // MISSING
|
||||
panelTitle2: 'Inline Styles', // MISSING
|
||||
panelTitle3: 'Object Styles' // MISSING
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'sv', {
|
||||
label: 'Anpassad stil',
|
||||
panelTitle: 'Formatmallar',
|
||||
panelTitle1: 'Blockstil',
|
||||
panelTitle2: 'Inbäddad stil',
|
||||
panelTitle3: 'Objektets stil'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'th', {
|
||||
label: 'ลักษณะ',
|
||||
panelTitle: 'Formatting Styles', // MISSING
|
||||
panelTitle1: 'Block Styles', // MISSING
|
||||
panelTitle2: 'Inline Styles', // MISSING
|
||||
panelTitle3: 'Object Styles' // MISSING
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'tr', {
|
||||
label: 'Biçem',
|
||||
panelTitle: 'Stilleri Düzenliyor',
|
||||
panelTitle1: 'Blok Stilleri',
|
||||
panelTitle2: 'Inline Stilleri',
|
||||
panelTitle3: 'Nesne Stilleri'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'ug', {
|
||||
label: 'ئۇسلۇب',
|
||||
panelTitle: 'ئۇسلۇب',
|
||||
panelTitle1: 'بۆلەك دەرىجىسىدىكى ئېلېمېنت ئۇسلۇبى',
|
||||
panelTitle2: 'ئىچكى باغلانما ئېلېمېنت ئۇسلۇبى',
|
||||
panelTitle3: 'نەڭ (Object) ئېلېمېنت ئۇسلۇبى'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'uk', {
|
||||
label: 'Стиль',
|
||||
panelTitle: 'Стилі форматування',
|
||||
panelTitle1: 'Блочні стилі',
|
||||
panelTitle2: 'Рядкові стилі',
|
||||
panelTitle3: 'Об\'єктні стилі'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'vi', {
|
||||
label: 'Kiểu',
|
||||
panelTitle: 'Phong cách định dạng',
|
||||
panelTitle1: 'Kiểu khối',
|
||||
panelTitle2: 'Kiểu trực tiếp',
|
||||
panelTitle3: 'Kiểu đối tượng'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'zh-cn', {
|
||||
label: '样式',
|
||||
panelTitle: '样式',
|
||||
panelTitle1: '块级元素样式',
|
||||
panelTitle2: '内联元素样式',
|
||||
panelTitle3: '对象元素样式'
|
||||
} );
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'stylescombo', 'zh', {
|
||||
label: '樣式',
|
||||
panelTitle: 'Formatting Styles', // MISSING
|
||||
panelTitle1: '區塊樣式',
|
||||
panelTitle2: '內嵌樣式',
|
||||
panelTitle3: '物件樣式'
|
||||
} );
|
||||
@@ -1,218 +1,188 @@
|
||||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
(function()
|
||||
{
|
||||
CKEDITOR.plugins.add( 'stylescombo',
|
||||
{
|
||||
requires : [ 'richcombo', 'styles' ],
|
||||
|
||||
init : function( editor )
|
||||
{
|
||||
var config = editor.config,
|
||||
lang = editor.lang.stylesCombo,
|
||||
styles = {},
|
||||
stylesList = [],
|
||||
combo;
|
||||
|
||||
function loadStylesSet( callback )
|
||||
{
|
||||
editor.getStylesSet( function( stylesDefinitions )
|
||||
{
|
||||
if ( !stylesList.length )
|
||||
{
|
||||
var style,
|
||||
styleName;
|
||||
|
||||
// Put all styles into an Array.
|
||||
for ( var i = 0, count = stylesDefinitions.length ; i < count ; i++ )
|
||||
{
|
||||
var styleDefinition = stylesDefinitions[ i ];
|
||||
|
||||
styleName = styleDefinition.name;
|
||||
|
||||
style = styles[ styleName ] = new CKEDITOR.style( styleDefinition );
|
||||
style._name = styleName;
|
||||
style._.enterMode = config.enterMode;
|
||||
|
||||
stylesList.push( style );
|
||||
}
|
||||
|
||||
// Sorts the Array, so the styles get grouped by type.
|
||||
stylesList.sort( sortStyles );
|
||||
}
|
||||
|
||||
callback && callback();
|
||||
});
|
||||
}
|
||||
|
||||
editor.ui.addRichCombo( 'Styles',
|
||||
{
|
||||
label : lang.label,
|
||||
title : lang.panelTitle,
|
||||
className : 'cke_styles',
|
||||
|
||||
panel :
|
||||
{
|
||||
css : editor.skin.editor.css.concat( config.contentsCss ),
|
||||
multiSelect : true,
|
||||
attributes : { 'aria-label' : lang.panelTitle }
|
||||
},
|
||||
|
||||
init : function()
|
||||
{
|
||||
combo = this;
|
||||
|
||||
loadStylesSet( function()
|
||||
{
|
||||
var style,
|
||||
styleName,
|
||||
lastType,
|
||||
type,
|
||||
i,
|
||||
count;
|
||||
|
||||
// Loop over the Array, adding all items to the
|
||||
// combo.
|
||||
for ( i = 0, count = stylesList.length ; i < count ; i++ )
|
||||
{
|
||||
style = stylesList[ i ];
|
||||
styleName = style._name;
|
||||
type = style.type;
|
||||
|
||||
if ( type != lastType )
|
||||
{
|
||||
combo.startGroup( lang[ 'panelTitle' + String( type ) ] );
|
||||
lastType = type;
|
||||
}
|
||||
|
||||
combo.add(
|
||||
styleName,
|
||||
style.type == CKEDITOR.STYLE_OBJECT ? styleName : style.buildPreview(),
|
||||
styleName );
|
||||
}
|
||||
|
||||
combo.commit();
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
onClick : function( value )
|
||||
{
|
||||
editor.focus();
|
||||
editor.fire( 'saveSnapshot' );
|
||||
|
||||
var style = styles[ value ],
|
||||
selection = editor.getSelection(),
|
||||
elementPath = new CKEDITOR.dom.elementPath( selection.getStartElement() );
|
||||
|
||||
style[ style.checkActive( elementPath ) ? 'remove' : 'apply' ]( editor.document );
|
||||
|
||||
editor.fire( 'saveSnapshot' );
|
||||
},
|
||||
|
||||
onRender : function()
|
||||
{
|
||||
editor.on( 'selectionChange', function( ev )
|
||||
{
|
||||
var currentValue = this.getValue(),
|
||||
elementPath = ev.data.path,
|
||||
elements = elementPath.elements;
|
||||
|
||||
// For each element into the elements path.
|
||||
for ( var i = 0, count = elements.length, element ; i < count ; i++ )
|
||||
{
|
||||
element = elements[i];
|
||||
|
||||
// Check if the element is removable by any of
|
||||
// the styles.
|
||||
for ( var value in styles )
|
||||
{
|
||||
if ( styles[ value ].checkElementRemovable( element, true ) )
|
||||
{
|
||||
if ( value != currentValue )
|
||||
this.setValue( value );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If no styles match, just empty it.
|
||||
this.setValue( '' );
|
||||
},
|
||||
this);
|
||||
},
|
||||
|
||||
onOpen : function()
|
||||
{
|
||||
if ( CKEDITOR.env.ie || CKEDITOR.env.webkit )
|
||||
editor.focus();
|
||||
|
||||
var selection = editor.getSelection(),
|
||||
element = selection.getSelectedElement(),
|
||||
elementPath = new CKEDITOR.dom.elementPath( element || selection.getStartElement() ),
|
||||
counter = [ 0, 0, 0, 0 ];
|
||||
|
||||
this.showAll();
|
||||
this.unmarkAll();
|
||||
for ( var name in styles )
|
||||
{
|
||||
var style = styles[ name ],
|
||||
type = style.type;
|
||||
|
||||
if ( style.checkActive( elementPath ) )
|
||||
this.mark( name );
|
||||
else if ( type == CKEDITOR.STYLE_OBJECT && !style.checkApplicable( elementPath ) )
|
||||
{
|
||||
this.hideItem( name );
|
||||
counter[ type ]--;
|
||||
}
|
||||
|
||||
counter[ type ]++;
|
||||
}
|
||||
|
||||
if ( !counter[ CKEDITOR.STYLE_BLOCK ] )
|
||||
this.hideGroup( lang[ 'panelTitle' + String( CKEDITOR.STYLE_BLOCK ) ] );
|
||||
|
||||
if ( !counter[ CKEDITOR.STYLE_INLINE ] )
|
||||
this.hideGroup( lang[ 'panelTitle' + String( CKEDITOR.STYLE_INLINE ) ] );
|
||||
|
||||
if ( !counter[ CKEDITOR.STYLE_OBJECT ] )
|
||||
this.hideGroup( lang[ 'panelTitle' + String( CKEDITOR.STYLE_OBJECT ) ] );
|
||||
},
|
||||
|
||||
// Force a reload of the data
|
||||
reset: function()
|
||||
{
|
||||
if ( combo )
|
||||
{
|
||||
delete combo._.panel;
|
||||
delete combo._.list;
|
||||
combo._.committed = 0;
|
||||
combo._.items = {};
|
||||
combo._.state = CKEDITOR.TRISTATE_OFF;
|
||||
}
|
||||
styles = {};
|
||||
stylesList = [];
|
||||
loadStylesSet();
|
||||
}
|
||||
});
|
||||
|
||||
editor.on( 'instanceReady', function() { loadStylesSet(); } );
|
||||
}
|
||||
});
|
||||
|
||||
function sortStyles( styleA, styleB )
|
||||
{
|
||||
var typeA = styleA.type,
|
||||
typeB = styleB.type;
|
||||
|
||||
return typeA == typeB ? 0 :
|
||||
typeA == CKEDITOR.STYLE_OBJECT ? -1 :
|
||||
typeB == CKEDITOR.STYLE_OBJECT ? 1 :
|
||||
typeB == CKEDITOR.STYLE_BLOCK ? 1 :
|
||||
-1;
|
||||
}
|
||||
})();
|
||||
/**
|
||||
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
( function() {
|
||||
'use strict';
|
||||
|
||||
CKEDITOR.plugins.add( 'stylescombo', {
|
||||
requires: 'richcombo',
|
||||
lang: 'af,ar,bg,bn,bs,ca,cs,cy,da,de,el,en,en-au,en-ca,en-gb,eo,es,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
|
||||
|
||||
init: function( editor ) {
|
||||
var config = editor.config,
|
||||
lang = editor.lang.stylescombo,
|
||||
styles = {},
|
||||
stylesList = [],
|
||||
combo,
|
||||
allowedContent = [];
|
||||
|
||||
editor.on( 'stylesSet', function( evt ) {
|
||||
var stylesDefinitions = evt.data.styles;
|
||||
|
||||
if ( !stylesDefinitions )
|
||||
return;
|
||||
|
||||
var style, styleName;
|
||||
|
||||
// Put all styles into an Array.
|
||||
for ( var i = 0, count = stylesDefinitions.length; i < count; i++ ) {
|
||||
var styleDefinition = stylesDefinitions[ i ];
|
||||
|
||||
if ( editor.blockless && ( styleDefinition.element in CKEDITOR.dtd.$block ) )
|
||||
continue;
|
||||
|
||||
styleName = styleDefinition.name;
|
||||
|
||||
style = new CKEDITOR.style( styleDefinition );
|
||||
|
||||
if ( !editor.filter.customConfig || editor.filter.check( style ) ) {
|
||||
style._name = styleName;
|
||||
style._.enterMode = config.enterMode;
|
||||
|
||||
// Weight is used to sort styles (#9029).
|
||||
style._.weight = i + ( style.type == CKEDITOR.STYLE_OBJECT ? 1 : style.type == CKEDITOR.STYLE_BLOCK ? 2 : 3 ) * 1000;
|
||||
|
||||
styles[ styleName ] = style;
|
||||
stylesList.push( style );
|
||||
allowedContent.push( style );
|
||||
}
|
||||
}
|
||||
|
||||
// Sorts the Array, so the styles get grouped by type in proper order (#9029).
|
||||
stylesList.sort( function( styleA, styleB ) { return styleA._.weight - styleB._.weight; } );
|
||||
} );
|
||||
|
||||
editor.ui.addRichCombo( 'Styles', {
|
||||
label: lang.label,
|
||||
title: lang.panelTitle,
|
||||
toolbar: 'styles,10',
|
||||
allowedContent: allowedContent,
|
||||
|
||||
panel: {
|
||||
css: [ CKEDITOR.skin.getPath( 'editor' ) ].concat( config.contentsCss ),
|
||||
multiSelect: true,
|
||||
attributes: { 'aria-label': lang.panelTitle }
|
||||
},
|
||||
|
||||
init: function() {
|
||||
var style, styleName, lastType, type, i, count;
|
||||
|
||||
// Loop over the Array, adding all items to the
|
||||
// combo.
|
||||
for ( i = 0, count = stylesList.length; i < count; i++ ) {
|
||||
style = stylesList[ i ];
|
||||
styleName = style._name;
|
||||
type = style.type;
|
||||
|
||||
if ( type != lastType ) {
|
||||
this.startGroup( lang[ 'panelTitle' + String( type ) ] );
|
||||
lastType = type;
|
||||
}
|
||||
|
||||
this.add( styleName, style.type == CKEDITOR.STYLE_OBJECT ? styleName : style.buildPreview(), styleName );
|
||||
}
|
||||
|
||||
this.commit();
|
||||
},
|
||||
|
||||
onClick: function( value ) {
|
||||
editor.focus();
|
||||
editor.fire( 'saveSnapshot' );
|
||||
|
||||
var style = styles[ value ],
|
||||
elementPath = editor.elementPath();
|
||||
|
||||
editor[ style.checkActive( elementPath ) ? 'removeStyle' : 'applyStyle' ]( style );
|
||||
editor.fire( 'saveSnapshot' );
|
||||
},
|
||||
|
||||
onRender: function() {
|
||||
editor.on( 'selectionChange', function( ev ) {
|
||||
var currentValue = this.getValue(),
|
||||
elementPath = ev.data.path,
|
||||
elements = elementPath.elements;
|
||||
|
||||
// For each element into the elements path.
|
||||
for ( var i = 0, count = elements.length, element; i < count; i++ ) {
|
||||
element = elements[ i ];
|
||||
|
||||
// Check if the element is removable by any of
|
||||
// the styles.
|
||||
for ( var value in styles ) {
|
||||
if ( styles[ value ].checkElementRemovable( element, true ) ) {
|
||||
if ( value != currentValue )
|
||||
this.setValue( value );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If no styles match, just empty it.
|
||||
this.setValue( '' );
|
||||
}, this );
|
||||
},
|
||||
|
||||
onOpen: function() {
|
||||
var selection = editor.getSelection(),
|
||||
element = selection.getSelectedElement(),
|
||||
elementPath = editor.elementPath( element ),
|
||||
counter = [ 0, 0, 0, 0 ];
|
||||
|
||||
this.showAll();
|
||||
this.unmarkAll();
|
||||
for ( var name in styles ) {
|
||||
var style = styles[ name ],
|
||||
type = style.type;
|
||||
|
||||
if ( style.checkApplicable( elementPath, editor.activeFilter ) )
|
||||
counter[ type ]++;
|
||||
else
|
||||
this.hideItem( name );
|
||||
|
||||
if ( style.checkActive( elementPath ) )
|
||||
this.mark( name );
|
||||
}
|
||||
|
||||
if ( !counter[ CKEDITOR.STYLE_BLOCK ] )
|
||||
this.hideGroup( lang[ 'panelTitle' + String( CKEDITOR.STYLE_BLOCK ) ] );
|
||||
|
||||
if ( !counter[ CKEDITOR.STYLE_INLINE ] )
|
||||
this.hideGroup( lang[ 'panelTitle' + String( CKEDITOR.STYLE_INLINE ) ] );
|
||||
|
||||
if ( !counter[ CKEDITOR.STYLE_OBJECT ] )
|
||||
this.hideGroup( lang[ 'panelTitle' + String( CKEDITOR.STYLE_OBJECT ) ] );
|
||||
},
|
||||
|
||||
refresh: function() {
|
||||
var elementPath = editor.elementPath();
|
||||
|
||||
if ( !elementPath )
|
||||
return;
|
||||
|
||||
for ( var name in styles ) {
|
||||
var style = styles[ name ];
|
||||
|
||||
if ( style.checkApplicable( elementPath, editor.activeFilter ) )
|
||||
return;
|
||||
}
|
||||
this.setState( CKEDITOR.TRISTATE_DISABLED );
|
||||
},
|
||||
|
||||
// Force a reload of the data
|
||||
reset: function() {
|
||||
if ( combo ) {
|
||||
delete combo._.panel;
|
||||
delete combo._.list;
|
||||
combo._.committed = 0;
|
||||
combo._.items = {};
|
||||
combo._.state = CKEDITOR.TRISTATE_OFF;
|
||||
}
|
||||
styles = {};
|
||||
stylesList = [];
|
||||
}
|
||||
} );
|
||||
}
|
||||
} );
|
||||
} )();
|
||||
|
||||
Reference in New Issue
Block a user