silverstripe-framework/thirdparty/tinymce-advcode/js/dialog.js
Ingo Schommer b734d702d3 MINOR Moved jsparty/tinymce_advcode to sapphire/thirdparty/tinymce-advcode
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93562 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:49 +13:00

17 lines
605 B
JavaScript

tinyMCEPopup.requireLangPack();
var CodeDialog = {
init : function() {
cp = document.getElementById('codepress') ? document.getElementById('codepress') : document.getElementById('codepress_cp');
cp.value = tinyMCEPopup.editor.getContent();
},
insert : function() {
// Customized by SilverStripe 2009-01-05 - see dialog.html for details
var content = (navigator.userAgent.match('KHTML')) ? document.getElementById('codepress').value : codepress.getCode();
tinyMCEPopup.editor.setContent(content);
tinyMCEPopup.close();
}
};
tinyMCEPopup.onInit.add(CodeDialog.init, CodeDialog);