Image caption fixes from azaozz. see #6812
git-svn-id: http://svn.automattic.com/wordpress/trunk@8245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ce365c94a4
commit
f79638378a
|
@ -5,8 +5,10 @@ function send_to_editor(h) {
|
|||
if (tinymce.isIE)
|
||||
ed.selection.moveToBookmark(tinymce.EditorManager.activeEditor.windowManager.bookmark);
|
||||
|
||||
if ( h.indexOf('[wp_caption') != -1 )
|
||||
h = ed.plugins.wpeditimage._do_shcode(h);
|
||||
|
||||
ed.execCommand('mceInsertContent', false, h);
|
||||
ed.execCommand('mceCleanup');
|
||||
} else
|
||||
edInsertContent(edCanvas, h);
|
||||
|
||||
|
|
|
@ -460,14 +460,13 @@ var wpImage = {
|
|||
tinyMCEPopup.close();
|
||||
return;
|
||||
} else {
|
||||
if ( DL ) {
|
||||
if ( DL && DIV ) {
|
||||
if ( f.link_href.value ) html = ed.dom.getOuterHTML(ed.dom.getParent(el, 'a'));
|
||||
else html = ed.dom.getOuterHTML(el);
|
||||
|
||||
P = ed.dom.create('p', {}, html);
|
||||
DL.parentNode.insertBefore(P,DL);
|
||||
ed.dom.remove(DL.childNodes);
|
||||
ed.dom.remove(DL);
|
||||
DIV.parentNode.insertBefore(P, DIV);
|
||||
ed.dom.remove(DIV);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -222,7 +222,7 @@ if ( $compress && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {
|
|||
// Setup cache info
|
||||
if ( $disk_cache ) {
|
||||
|
||||
$cacheKey = apply_filters('tiny_mce_version', '20080626');
|
||||
$cacheKey = apply_filters('tiny_mce_version', '20080702');
|
||||
|
||||
foreach ( $initArray as $v )
|
||||
$cacheKey .= $v;
|
||||
|
|
|
@ -34,7 +34,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
$visual_editor = apply_filters('visual_editor', array('tiny_mce'));
|
||||
$scripts->add( 'editor', false, $visual_editor, '20080321' );
|
||||
|
||||
$scripts->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080701' );
|
||||
$scripts->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080702' );
|
||||
|
||||
// Modify this version when tinyMCE plugins are changed.
|
||||
$mce_version = apply_filters('tiny_mce_version', '20080701');
|
||||
|
@ -159,7 +159,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
'edit' => __('Edit'),
|
||||
) );
|
||||
$scripts->add( 'admin-gallery', '/wp-admin/js/gallery.js', array( 'jquery-ui-sortable' ), '20080520' );
|
||||
$scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '20080701' );
|
||||
$scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '20080702' );
|
||||
$scripts->localize( 'upload', 'uploadL10n', array(
|
||||
'browseTitle' => attribute_escape(__('Browse your files')),
|
||||
'back' => __('« Back'),
|
||||
|
|
Loading…
Reference in New Issue