1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 12:48:26 +02:00

Closes #327 - filepicker() problem.

This commit is contained in:
Cameron
2013-05-20 15:16:02 -07:00
parent de808f74d5
commit 75b10de4a9
2 changed files with 11 additions and 2 deletions

View File

@@ -130,6 +130,12 @@ if((e_WYSIWYG && check_class($pref['post_html'])) || strpos(e_SELF,"tinymce/admi
$('.e-dialog-save').click(function(){ $('.e-dialog-save').click(function(){
var html = $('#html_holder').val(); var html = $('#html_holder').val();
if(html === undefined)
{
return;
}
// tinyMCE.execCommand('mceInsertContent',false,html); // tinyMCE.execCommand('mceInsertContent',false,html);
tinyMCE.execCommand('mceInsertRawHTML',false,html); tinyMCE.execCommand('mceInsertRawHTML',false,html);
tinyMCEPopup.close(); tinyMCEPopup.close();

View File

@@ -3,10 +3,11 @@ $(document).ready(function()
$(".e-dialog-save").live("click", function(){// FIXME TODO missing caret , text selection overwrite etc. $(".e-dialog-save").live("click", function(){// FIXME TODO missing caret , text selection overwrite etc.
var newval = $('#bbcode_holder').val(); var newval = $('#bbcode_holder').val();
var target = $(this).attr('data-target'); var target = $(this).attr('data-target');
var bbcode = $(this).attr('data-bbcode'); // TinyMce/Textarea insert mode
if(!target){ return true; } if(!target || !bbcode){ return true; }
$('#' + target, window.top.document).atCaret('insert', newval); // http://code.google.com/p/jquery-at-caret/wiki/GettingStarted $('#' + target, window.top.document).atCaret('insert', newval); // http://code.google.com/p/jquery-at-caret/wiki/GettingStarted
@@ -169,6 +170,8 @@ $(document).ready(function()
} }
$('#src').attr('value',src); // working old $('#src').attr('value',src); // working old
$('#preview').attr('src',preview); // working old $('#preview').attr('src',preview); // working old