mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
17 lines
605 B
JavaScript
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);
|