first commit

This commit is contained in:
/usr/bin/nano
2017-04-15 01:34:36 +03:00
commit c715e2a604
5325 changed files with 329700 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
/**
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.dialog.add( 'sourcedialog', function( editor ) {
var size = CKEDITOR.document.getWindow().getViewPaneSize();
// Make it maximum 800px wide, but still fully visible in the viewport.
var width = Math.min( size.width - 70, 800);
// Make it use 2/3 of the viewport height.
var height = size.height / 1.5;
// Store old editor data to avoid unnecessary setData.
var oldData;
return {
title: editor.lang.sourcedialog.title,
minWidth: 100,
minHeight: 100,
onShow: function() {
this.setValueOf( 'main', 'data', oldData = editor.getData() );
},
onOk: (function() {
function setData( newData ) {
var that = this;
editor.setData( newData, function() {
that.hide();
// Ensure correct selection.
var range = editor.createRange();
range.moveToElementEditStart( editor.editable() );
range.select();
} );
}
return function( event ) {
// Remove CR from input data for reliable comparison with editor data.
var newData = this.getValueOf( 'main', 'data' ).replace( /\r/g, '' );
// Avoid unnecessary setData. Also preserve selection
// when user changed his mind and goes back to wysiwyg editing.
if ( newData === oldData )
return true;
// Set data asynchronously to avoid errors in IE.
CKEDITOR.env.ie ?
CKEDITOR.tools.setTimeout( setData, 0, this, newData )
:
setData.call( this, newData );
// Don't let the dialog close before setData is over.
return false;
};
})(),
contents: [{
id: 'main',
label: editor.lang.sourcedialog.title,
elements: [{
type: 'textarea',
type: 'textarea',
id: 'data',
dir: 'ltr',
inputStyle: 'cursor:auto;' +
'width:' + width + 'px;' +
'height:' + height + 'px;' +
'tab-size:4;' +
'text-align:left;',
'class': 'cke_source'
}]
}]
};
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 762 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 764 B

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'af', {
toolbar: 'Bron',
title: 'Bron'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'ar', {
toolbar: 'المصدر',
title: 'المصدر'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'bg', {
toolbar: 'Източник',
title: 'Източник'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'bn', {
toolbar: 'সোর্স',
title: 'সোর্স'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'bs', {
toolbar: 'HTML kôd',
title: 'HTML kôd'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'ca', {
toolbar: 'Codi font',
title: 'Codi font'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'cs', {
toolbar: 'Zdroj',
title: 'Zdroj'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'cy', {
toolbar: 'HTML',
title: 'HTML'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'da', {
toolbar: 'Kilde',
title: 'Kilde'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'de', {
toolbar: 'Quellcode',
title: 'Quellcode'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'el', {
toolbar: 'HTML κώδικας',
title: 'HTML κώδικας'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'en-au', {
toolbar: 'Source',
title: 'Source'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'en-ca', {
toolbar: 'Source',
title: 'Source'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'en-gb', {
toolbar: 'Source',
title: 'Source'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'en', {
toolbar: 'Source',
title: 'Source'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'eo', {
toolbar: 'Fonto',
title: 'Fonto'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'es', {
toolbar: 'Fuente HTML',
title: 'Fuente HTML'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'et', {
toolbar: 'Lähtekood',
title: 'Lähtekood'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'eu', {
toolbar: 'HTML Iturburua',
title: 'HTML Iturburua'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'fa', {
toolbar: 'منبع',
title: 'منبع'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'fi', {
toolbar: 'Koodi',
title: 'Koodi'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'fo', {
toolbar: 'Kelda',
title: 'Kelda'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'fr-ca', {
toolbar: 'Source',
title: 'Source'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'fr', {
toolbar: 'Source',
title: 'Source'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'gl', {
toolbar: 'Orixe',
title: 'Orixe'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'gu', {
toolbar: 'મૂળ કે પ્રાથમિક દસ્તાવેજ',
title: 'મૂળ કે પ્રાથમિક દસ્તાવેજ'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'he', {
toolbar: 'מקור',
title: 'מקור'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'hi', {
toolbar: 'सोर्स',
title: 'सोर्स'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'hr', {
toolbar: 'Kôd',
title: 'Kôd'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'hu', {
toolbar: 'Forráskód',
title: 'Forráskód'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'id', {
toolbar: 'Sumber',
title: 'Sumber'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'is', {
toolbar: 'Kóði',
title: 'Kóði'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'it', {
toolbar: 'Sorgente',
title: 'Sorgente'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'ja', {
toolbar: 'ソース',
title: 'ソース'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'ka', {
toolbar: 'კოდები',
title: 'კოდები'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'km', {
toolbar: 'អក្សរ​កូដ',
title: 'អក្សរ​កូដ'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'ko', {
toolbar: '소스',
title: '소스'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'ku', {
toolbar: 'سەرچاوە',
title: 'سەرچاوە'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'lt', {
toolbar: 'Šaltinis',
title: 'Šaltinis'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'lv', {
toolbar: 'HTML kods',
title: 'HTML kods'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'mn', {
toolbar: 'Код',
title: 'Код'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'ms', {
toolbar: 'Sumber',
title: 'Sumber'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'nb', {
toolbar: 'Kilde',
title: 'Kilde'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'nl', {
toolbar: 'Code',
title: 'Code'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'no', {
toolbar: 'Kilde',
title: 'Kilde'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'pl', {
toolbar: 'Źródło dokumentu',
title: 'Źródło dokumentu'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'pt-br', {
toolbar: 'Código-Fonte',
title: 'Código-Fonte'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'pt', {
toolbar: 'Fonte',
title: 'Fonte'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'ro', {
toolbar: 'Sursa',
title: 'Sursa'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'ru', {
toolbar: 'Исходник',
title: 'Источник'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'si', {
toolbar: 'මුලාශ්‍රය',
title: 'මුලාශ්‍රය'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'sk', {
toolbar: 'Zdroj',
title: 'Zdroj'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'sl', {
toolbar: 'Izvorna koda',
title: 'Izvorna koda'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'sq', {
toolbar: 'Burimi',
title: 'Burimi'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'sr-latn', {
toolbar: 'Kôd',
title: 'Kôd'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'sr', {
toolbar: 'Kôд',
title: 'Kôд'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'sv', {
toolbar: 'Källa',
title: 'Källa'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'th', {
toolbar: 'ดูรหัส HTML',
title: 'ดูรหัส HTML'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'tr', {
toolbar: 'Kaynak',
title: 'Kaynak'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'ug', {
toolbar: 'مەنبە',
title: 'مەنبە'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'uk', {
toolbar: 'Джерело',
title: 'Джерело'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'vi', {
toolbar: 'Mã HTML',
title: 'Mã HTML'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'zh-cn', {
toolbar: '源码',
title: '源码'
});

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcedialog', 'zh', {
toolbar: '原始碼',
title: '原始碼'
});

View File

@@ -0,0 +1,27 @@
/**
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.add( 'sourcedialog', {
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,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%
icons: 'sourcedialog,sourcedialog-rtl', // %REMOVE_LINE_CORE%
hidpi: true, // %REMOVE_LINE_CORE%
init: function( editor ) {
// Register the "source" command, which simply opens the "source" dialog.
editor.addCommand( 'sourcedialog', new CKEDITOR.dialogCommand( 'sourcedialog' ) );
// Register the "source" dialog.
CKEDITOR.dialog.add( 'sourcedialog', this.path + 'dialogs/sourcedialog.js' );
// If the toolbar is available, create the "Source" button.
if ( editor.ui.addButton ) {
editor.ui.addButton( 'Sourcedialog', {
label: editor.lang.sourcedialog.toolbar,
command: 'sourcedialog',
toolbar: 'mode,10'
});
}
}
});

View File

@@ -0,0 +1,118 @@
<!DOCTYPE html>
<!--
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
-->
<html>
<head>
<title>Raw HTML editing with dialog-based source editor &mdash; CKEditor Sample</title>
<meta charset="utf-8">
<script src="../../../ckeditor.js"></script>
<link rel="stylesheet" href="../../../samples/sample.css">
<meta name="ckeditor-sample-name" content="Raw HTML editing with dialog-based source editor">
<meta name="ckeditor-sample-group" content="Plugins">
<meta name="ckeditor-sample-description" content="Editing HTML content of both inline and framed editor instances.">
<meta name="ckeditor-sample-isnew" content="1">
<style>
#editable
{
padding: 10px;
float: left;
}
</style>
</head>
<body>
<h1 class="samples">
<a href="../../../samples/index.html">CKEditor Samples</a> &raquo; Raw HTML editing with dialog-based source editor
</h1>
<div class="description">
<p>
<strong>Sourcedialog</strong> plugin provides an easy way to edit raw HTML content
of an editor, similarly to what is possible with <strong>Sourcearea</strong>
plugin for framed instances but using dialogs. Thanks to that, it's also possible
to manipulate raw content of inline editor instances.
</p>
<p>
This plugin extends the toolbar with a button,
which opens a dialog window with a source code editor. It works with both framed
and inline instances. To enable this
plugin, basically add <code>extraPlugins: 'sourcedialog'</code> to editor's
config:
</p>
<pre class="samples">
// Inline editor.
CKEDITOR.inline( 'editable', {
<strong>extraPlugins: 'sourcedialog'</strong>
});
// Framed editor.
CKEDITOR.replace( 'textarea_id', {
<strong>extraPlugins: 'sourcedialog'</strong>,
removePlugins: 'sourcearea'
});
</pre>
<p>
Note that you may want to include <code>removePlugins: 'sourcearea'</code>
in your config when using <strong>Sourcedialog</strong> in framed instances.
This prevents feature redundancy.
</p>
<p>
Note that <code>editable</code> in the code above is the <code>id</code>
attribute of the <code>&lt;div&gt;</code> element to be converted into an inline instance.
</p>
<p>
Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of
the <code>&lt;textarea&gt;</code> element to be replaced with CKEditor.
</p>
</div>
<div>
<label for="editor1">
Inline editor:
</label>
<div id="editor1" contenteditable="true" style="padding: 5px 20px;">
<p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
</div>
</div>
<br>
<div>
<label for="editor2">
Framed editor:
</label>
<textarea cols="80" id="editor2" name="editor2" rows="10">
This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.
</textarea>
</div>
<script>
// We need to turn off the automatic editor creation first.
CKEDITOR.disableAutoInline = true;
var config = {
toolbarGroups: [
{ name: 'mode' },
{ name: 'basicstyles' },
{ name: 'links' }
],
extraPlugins: 'sourcedialog',
removePlugins: 'sourcearea'
}
CKEDITOR.inline( 'editor1', config );
CKEDITOR.replace( 'editor2', config );
</script>
<div id="footer">
<hr>
<p>
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">
http://ckeditor.com</a>
</p>
<p id="copy">
Copyright &copy; 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a>
- Frederico Knabben. All rights reserved.
</p>
</div>
</body>
</html>