diff --git a/wp-admin/press-this.php b/wp-admin/press-this.php
index 96b20d6935..e8223e2782 100644
--- a/wp-admin/press-this.php
+++ b/wp-admin/press-this.php
@@ -117,7 +117,7 @@ switch ($_REQUEST['ajax']) {
case 'video': ?>
-
+
@@ -177,12 +177,12 @@ switch ($_REQUEST['ajax']) {
]*)src=(\"|\')([^<>]+?\.(png|jpeg|jpg|jpe|gif))[^<>\'\"]*(\2)([^>\/]*)\/*>/is';
@@ -192,6 +192,7 @@ switch ($_REQUEST['ajax']) {
$sources = array();
foreach ($matches[3] as $src) {
+ error_log($src);
// if no http in url
if(strpos($src, 'http') === false)
// if it doesn't have a relative uri
@@ -257,9 +258,9 @@ switch ($_REQUEST['ajax']) {
if(length == 0) length = 1;
jQuery('.photolist').append('');
jQuery('.photolist').append('');
- append_editor("\n\n" + '
');
+ insert_editor("\n\n" + '
');
}
- tinyMCE.activeEditor.resizeToContent();
+ /*tinyMCE.activeEditor.resizeToContent();*/
return false;
}
@@ -342,7 +343,7 @@ die;
remove_linebreaks : true,
accessibility_focus : false,
tab_focus : ":next",
- plugins : "safari,inlinepopups, media",
+ plugins : "safari, inlinepopups, media",
entities : "38,amp,60,lt,62,gt",
force_p_newlines : true,
save_callback : 'switchEditors.saveCallback'
@@ -372,10 +373,11 @@ die;
if ( '' == text || '' == text ) text = '
';
if ( tinyMCE.activeEditor ) tinyMCE.execCommand('mceSetContent', false, text);
}
-
+ function insert_editor(text) {
+ if ( '' != text && tinyMCE.activeEditor ) tinyMCE.execCommand('mceInsertContent', false, '' + tinymce.DOM.decode(text) + '
');
+ }
function append_editor(text) {
- if ( '' != text && tinyMCE.activeEditor ) tinyMCE.execCommand('mceSetContent', false, tinyMCE.activeEditor.getContent({format : 'raw'})
- + '' + tinymce.DOM.decode(text) + '
');
+ if ( '' != text && tinyMCE.activeEditor ) tinyMCE.execCommand('mceSetContent', false, tinyMCE.activeEditor.getContent({format : 'raw'}) + '' + text + '
');
tinyMCE.execCommand('mceCleanup');
}
@@ -532,7 +534,7 @@ die;