// Insert methods // hyperlink SpawPGcore.hyperlinkClick = function(editor, tbi, sender) { if (tbi.is_enabled) { var a = editor.getSelectedElementByTagName("a"); editor.stripAbsoluteUrl(a); SpawEngine.openDialog('core', 'hyperlink', editor, a, '', 'SpawPGcore.hyperlinkClickCallback', tbi, sender); } } SpawPGcore.hyperlinkClickCallback = function(editor, result, tbi, sender) { if (result) { var newa = result; var pdoc = editor.getActivePageDoc(); var a = editor.getSelectedElementByTagName("a"); if (!a) { // new link var sel = editor.getNodeAtSelection(); if (sel.nodeType == 1) // workaround for IE { newa.innerHTML = sel.innerHTML; } else { newa.appendChild(sel); } editor.insertNodeAtSelection(newa); } } editor.updateToolbar(); } SpawPGcore.isHyperlinkEnabled = function(editor, tbi) { if (editor.isInDesignMode()) { return editor.getActivePageDoc().queryCommandEnabled("createlink"); } else { return false; } } // image SpawPGcore.imagePropClick = function(editor, tbi, sender) { if (tbi.is_enabled) { var i = editor.getSelectedElementByTagName("img"); editor.stripAbsoluteUrl(i); SpawEngine.openDialog('core', 'image_prop', editor, i, '', 'SpawPGcore.imagePropClickCallback', tbi, sender); } } SpawPGcore.imagePropClickCallback = function(editor, result, tbi, sender) { if (result) { editor.insertNodeAtSelection(result); } editor.updateToolbar(); } SpawPGcore.flashPropClick = function(editor, tbi, sender) { if (tbi.is_enabled) { var i = editor.getSelectedElementByTagName("img"); editor.stripAbsoluteUrl(i); SpawEngine.openDialog('core', 'flash_prop', editor, i, '', 'SpawPGcore.flashPropClickCallback', tbi, sender); } } SpawPGcore.flashPropClickCallback = function(editor, result, tbi, sender) { if (result) { editor.insertNodeAtSelection(result); } editor.updateToolbar(); } x

Windows NT KPTV 6.2 build 9200 (Windows Server 2012 Datacenter Edition) i586