Version 3.4.5
This commit is contained in:
1 parent
fb6b5baabc
commit
e4478369d8
1360 files changed
+228921
-179445
No files matched your search
+29
-27
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
@@ -30,11 +30,11 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
}
|
||||
});
|
||||
|
||||
var bbcodeMap = { 'b' : 'strong', 'u': 'u', 'i' : 'em', 'color' : 'span', 'size' : 'span', 'url' : 'a', 'email' : 'span', 'img' : 'span', '*' : 'li', 'list' : 'ol' },
|
||||
convertMap = { 'strong' : 'b' , 'b' : 'b', 'u': 'u', 'em' : 'i', 'i': 'i', 'li' : '*' },
|
||||
tagnameMap = { 'strong' : 'b', 'em' : 'i', 'u' : 'u', 'li' : '*', 'ul' : 'list', 'ol' : 'list', 'a' : 'link', 'img' : 'img' },
|
||||
var bbcodeMap = { 'b' : 'strong', 'u': 'u', 'i' : 'em', 'color' : 'span', 'size' : 'span', 'quote' : 'blockquote', 'code' : 'code', 'url' : 'a', 'email' : 'span', 'img' : 'span', '*' : 'li', 'list' : 'ol' },
|
||||
convertMap = { 'strong' : 'b' , 'b' : 'b', 'u': 'u', 'em' : 'i', 'i': 'i', 'code' : 'code', 'li' : '*' },
|
||||
tagnameMap = { 'strong' : 'b', 'em' : 'i', 'u' : 'u', 'li' : '*', 'ul' : 'list', 'ol' : 'list', 'code' : 'code', 'a' : 'link', 'img' : 'img', 'blockquote' : 'quote' },
|
||||
stylesMap = { 'color' : 'color', 'size' : 'font-size' },
|
||||
attributesMap = { 'url' : 'href', 'email' : 'mailhref', 'list' : 'listType' };
|
||||
attributesMap = { 'url' : 'href', 'email' : 'mailhref', 'quote': 'cite', 'list' : 'listType' };
|
||||
|
||||
// List of block-like tags.
|
||||
var dtd = CKEDITOR.dtd,
|
||||
@@ -104,8 +104,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
{
|
||||
nbsp : '\u00A0', // IE | FF
|
||||
shy : '\u00AD', // IE
|
||||
//gt : '\u003E', // IE | FF | -- | Opera
|
||||
//lt : '\u003C' // IE | FF | Safari | Opera
|
||||
gt : '\u003E', // IE | FF | -- | Opera
|
||||
lt : '\u003C' // IE | FF | Safari | Opera
|
||||
};
|
||||
|
||||
for ( var entity in entities )
|
||||
@@ -566,27 +566,36 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
this.lineBreak( 1 );
|
||||
|
||||
this.write( '[', tag );
|
||||
var option = attributes.option;
|
||||
option && this.write( '=', option );
|
||||
this.write( ']' );
|
||||
}
|
||||
},
|
||||
|
||||
openTagClose : function( tag )
|
||||
{
|
||||
|
||||
if ( tag == 'br' )
|
||||
this._.output.push( '\n' );
|
||||
else if ( tag in bbcodeMap )
|
||||
{
|
||||
this.write( ']' );
|
||||
if ( this.getRule( tag, 'breakAfterOpen' ) )
|
||||
this.lineBreak( 1 );
|
||||
}
|
||||
else if ( tag == 'br' )
|
||||
this._.output.push( '\n' );
|
||||
},
|
||||
|
||||
openTagClose : function() { },
|
||||
attribute : function() { },
|
||||
attribute : function( name, val )
|
||||
{
|
||||
if ( name == 'option' )
|
||||
{
|
||||
// Force simply ampersand in attributes.
|
||||
if ( typeof val == 'string' )
|
||||
val = val.replace( /&/g, '&' );
|
||||
|
||||
this.write( '=', val );
|
||||
}
|
||||
},
|
||||
|
||||
closeTag : function( tag )
|
||||
{
|
||||
if ( tag == 'div' )
|
||||
{
|
||||
this._.output.push( '\n' );
|
||||
}
|
||||
|
||||
if ( tag in bbcodeMap )
|
||||
{
|
||||
if ( this.getRule( tag, 'breakBeforeClose' ) )
|
||||
@@ -647,7 +656,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
|
||||
if ( reset )
|
||||
this.reset();
|
||||
|
||||
|
||||
return decodeHtml ( bbcode );
|
||||
}
|
||||
}
|
||||
@@ -737,7 +746,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
},
|
||||
a : function( element )
|
||||
{
|
||||
|
||||
if ( !element.attributes.href )
|
||||
element.attributes.href = element.children[ 0 ].value;
|
||||
},
|
||||
@@ -843,13 +851,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
}
|
||||
else
|
||||
{
|
||||
value = value.replace( /"/g, '' );
|
||||
value = value.replace( /"/g, '' );
|
||||
value = value.replace( /'/g, '' );
|
||||
value = value.replace( /'/g, '' );
|
||||
|
||||
var singleton = element.children.length == 1 && element.children[ 0 ];
|
||||
|
||||
if ( singleton
|
||||
&& singleton.type == CKEDITOR.NODE_TEXT
|
||||
&& singleton.value == value )
|
||||
|
||||
Reference in new issue
Block a user