Version 3.4.5
This commit is contained in:
1 parent
fb6b5baabc
commit
e4478369d8
1360 files changed
+228921
-179445
No files matched your search
@@ -10,24 +10,48 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
return {
|
||||
title : ipb.lang['ckeditor__code_title'],
|
||||
|
||||
minWidth : CKEDITOR.env.ie && CKEDITOR.env.quirks ? 368 : 350,
|
||||
minHeight : 340,
|
||||
minWidth : CKEDITOR.env.ie && CKEDITOR.env.quirks ? 768 : 750,
|
||||
minHeight : 440,
|
||||
|
||||
onShow : function()
|
||||
{
|
||||
// Reset the textarea value.
|
||||
this.getContentElement( 'general', 'content' ).getInputElement().setValue( '' );
|
||||
$$('.cke_dialog_contents .cke_pastetext').each( function(el) { el.setStyle( { width: '722px', margin: '0 auto' } ); } );
|
||||
$$('.cke_dialog_contents .cke_dialog_ui_input_textarea').each( function(el) { el.setStyle( { 'font-family': 'monospace', 'font-size': '13px' } ); } );
|
||||
|
||||
// Set focus in the textarea
|
||||
this.getContentElement( 'general', 'content' ).getInputElement().focus();
|
||||
},
|
||||
|
||||
onOk : function()
|
||||
{
|
||||
// Get the textarea value.
|
||||
var text = this.getContentElement( 'general', 'content' ).getInputElement().getValue(),
|
||||
var text = this.getContentElement( 'general', 'content' ).getInputElement().getValue(),
|
||||
editor = this.getParentEditor();
|
||||
|
||||
setTimeout( function()
|
||||
|
||||
var codeType = this.getContentElement( 'general', 'ctype' ).getInputElement().getValue();
|
||||
var lineNum = this.getContentElement( 'general', 'clinenum' ).getInputElement().getValue();
|
||||
var className = '_prettyXprint';
|
||||
|
||||
if ( codeType != 'auto' )
|
||||
{
|
||||
editor.fire( 'paste', { 'text' : "[CODE]\n" + text + "\n[/CODE]" } );
|
||||
className += ' _lang-' + codeType;
|
||||
}
|
||||
|
||||
if ( lineNum )
|
||||
{
|
||||
className += ' _linenums:' + parseInt( lineNum );
|
||||
}
|
||||
|
||||
setTimeout( function()
|
||||
{
|
||||
var el = new CKEDITOR.dom.element( 'pre' );
|
||||
el.addClass( className );
|
||||
el.appendText( text + "\n" );
|
||||
|
||||
editor.insertElement( el );
|
||||
editor.insertHtml('<p></p>');
|
||||
}, 0 );
|
||||
},
|
||||
|
||||
@@ -41,13 +65,54 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
{
|
||||
type : 'html',
|
||||
id : 'pasteMsg',
|
||||
html : '<div style="white-space:normal;width:340px;">' + editor.lang.clipboard.pasteMsg + '</div>'
|
||||
html : '<div style="white-space:normal;width:720px;">' + editor.lang.clipboard.pasteMsg + '</div>'
|
||||
},
|
||||
{
|
||||
id : 'ctype',
|
||||
type : 'select',
|
||||
label : ipb.lang['ckeditor__codetypelabel'],
|
||||
items : [
|
||||
[ ipb.lang['ckeditor__code_generic'], 'auto' ],
|
||||
[ ipb.lang['ckeditor__code_js'] , 'js' ],
|
||||
[ ipb.lang['ckeditor__code_html'] , 'html' ],
|
||||
[ ipb.lang['ckeditor__code_sql'] , 'sql' ],
|
||||
[ ipb.lang['ckeditor__code_css'] , 'css' ],
|
||||
[ ipb.lang['ckeditor__code_xml'] , 'xml' ],
|
||||
[ ipb.lang['ckeditor__code_none'] , 'nocode' ],
|
||||
],
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'cke-saved-code-type', this.getValue() );
|
||||
else
|
||||
{
|
||||
element.setAttribute( 'cke-saved-code-type', false );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'clinenum',
|
||||
type : 'text',
|
||||
label : ipb.lang['ckeditor__code_linenum'],
|
||||
commit : function( data )
|
||||
{
|
||||
var element = data.element;
|
||||
|
||||
if ( this.getValue() )
|
||||
element.setAttribute( 'cke-saved-code-linenum', this.getValue() );
|
||||
else
|
||||
{
|
||||
element.setAttribute( 'cke-saved-code-linenum', false );
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'textarea',
|
||||
id : 'content',
|
||||
className : 'cke_pastetext',
|
||||
|
||||
'default': '',
|
||||
|
||||
onLoad : function()
|
||||
{
|
||||
var label = this.getDialog().getContentElement( 'general', 'pasteMsg' ).getElement(),
|
||||
@@ -55,13 +120,17 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
|
||||
input.setAttribute( 'aria-labelledby', label.$.id );
|
||||
input.setStyle( 'width', '98%' );
|
||||
input.setStyle( 'height', '280px' );
|
||||
input.setStyle( 'height', '240px' );
|
||||
input.setStyle( 'direction', editor.config.contentsLangDirection );
|
||||
},
|
||||
|
||||
focus : function()
|
||||
{
|
||||
this.getElement().focus();
|
||||
},
|
||||
|
||||
commit : function( data )
|
||||
{
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in new issue
Block a user