Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
ckeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vanilla ckeditor-3.5.3
[ckeditor.git]
/
_source
/
plugins
/
flash
/
plugin.js
diff --git
a/_source/plugins/flash/plugin.js
b/_source/plugins/flash/plugin.js
index
41814e3
..
7641a9e
100644
(file)
--- a/
_source/plugins/flash/plugin.js
+++ b/
_source/plugins/flash/plugin.js
@@
-1,19
+1,13
@@
/*
\r
/*
\r
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
\r
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
\r
For licensing, see LICENSE.html or http://ckeditor.com/license
\r
*/
\r
\r
(function()
\r
{
\r
For licensing, see LICENSE.html or http://ckeditor.com/license
\r
*/
\r
\r
(function()
\r
{
\r
- var flashFilenameRegex = /\.swf(?:$|\?)/i,
\r
- numberRegex = /^\d+(?:\.\d+)?$/;
\r
+ var flashFilenameRegex = /\.swf(?:$|\?)/i;
\r
\r
\r
- function cssifyLength( length )
\r
- {
\r
- if ( numberRegex.test( length ) )
\r
- return length + 'px';
\r
- return length;
\r
- }
\r
+ var cssifyLength = CKEDITOR.tools.cssLength;
\r
\r
function isFlashEmbed( element )
\r
{
\r
\r
function isFlashEmbed( element )
\r
{
\r
@@
-77,12
+71,21
@@
For licensing, see LICENSE.html or http://ckeditor.com/license
});
\r
}
\r
\r
});
\r
}
\r
\r
+ editor.on( 'doubleclick', function( evt )
\r
+ {
\r
+ var element = evt.data.element;
\r
+
\r
+ if ( element.is( 'img' ) && element.data( 'cke-real-element-type' ) == 'flash' )
\r
+ evt.data.dialog = 'flash';
\r
+ });
\r
+
\r
// If the "contextmenu" plugin is loaded, register the listeners.
\r
if ( editor.contextMenu )
\r
{
\r
editor.contextMenu.addListener( function( element, selection )
\r
{
\r
// If the "contextmenu" plugin is loaded, register the listeners.
\r
if ( editor.contextMenu )
\r
{
\r
editor.contextMenu.addListener( function( element, selection )
\r
{
\r
- if ( element && element.is( 'img' ) && element.getAttribute( '_cke_real_element_type' ) == 'flash' )
\r
+ if ( element && element.is( 'img' ) && !element.isReadOnly()
\r
+ && element.data( 'cke-real-element-type' ) == 'flash' )
\r
return { flash : CKEDITOR.TRISTATE_OFF };
\r
});
\r
}
\r
return { flash : CKEDITOR.TRISTATE_OFF };
\r
});
\r
}
\r
@@
-104,7
+107,7
@@
For licensing, see LICENSE.html or http://ckeditor.com/license
var attributes = element.attributes,
\r
classId = attributes.classid && String( attributes.classid ).toLowerCase();
\r
\r
var attributes = element.attributes,
\r
classId = attributes.classid && String( attributes.classid ).toLowerCase();
\r
\r
- if ( !classId )
\r
+ if ( !classId && !isFlashEmbed( element ) )
\r
{
\r
// Look for the inner <embed>
\r
for ( var i = 0 ; i < element.children.length ; i++ )
\r
{
\r
// Look for the inner <embed>
\r
for ( var i = 0 ; i < element.children.length ; i++ )
\r