mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-24 03:41:53 +02:00
Fix timestamper widget to deal with tinyMCE
This commit is contained in:
parent
486f8e0b4b
commit
bde724d29f
@ -110,7 +110,7 @@ var et2_timestamper = (function(){ "use strict"; return et2_button.extend([],
|
|||||||
"standards" : (document.selection ? "ie" : false ) );
|
"standards" : (document.selection ? "ie" : false ) );
|
||||||
|
|
||||||
var pos = 0;
|
var pos = 0;
|
||||||
var CK = CKEDITOR && CKEDITOR.instances[input.id] || false;
|
var tinymce = tinyMCE && tinyMCE.EditorManager.get(input.id) || false;
|
||||||
|
|
||||||
// Find cursor or selection
|
// Find cursor or selection
|
||||||
if (browser == "ie")
|
if (browser == "ie")
|
||||||
@ -126,12 +126,9 @@ var et2_timestamper = (function(){ "use strict"; return et2_button.extend([],
|
|||||||
};
|
};
|
||||||
|
|
||||||
// If CKEDitor, update it
|
// If CKEDitor, update it
|
||||||
if(CKEDITOR && CKEDITOR.instances[input.id])
|
if(tinymce)
|
||||||
{
|
{
|
||||||
CKEDITOR.instances[input.id].insertText(text);
|
tinymce.insertContent(text);
|
||||||
window.setTimeout(function() {
|
|
||||||
CKEDITOR.instances[input.id].focus();
|
|
||||||
}, 10);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user