var devkit = parent.tinyMCE.plugins['devkit'], logEnabled = true, flip = false, book = null; function init() { var log, i, f = document.forms[0]; devkit._winLoaded = true; log = tinyMCE.log; for (i=0; i'; h += ''; h += addRenderInfo('editorId', inst.editorId); h += addRenderInfo('visualAid', inst.visualAid); h += addRenderInfo('foreColor', inst.foreColor); h += addRenderInfo('backColor', inst.backColor); h += addRenderInfo('formTargetElementId', inst.formTargetElementId); h += addRenderInfo('formElement', inst.formElement ? inst.formElement.nodeName : null); h += addRenderInfo('oldTargetElement', inst.oldTargetElement ? inst.oldTargetElement.nodeName : null); h += addRenderInfo('linkElement', inst.linkElement ? inst.linkElement.nodeName : null, 'dep'); h += addRenderInfo('imgElement', inst.imgElement ? inst.imgElement.nodeName : null, 'dep'); h += addRenderInfo('selectedNode', inst.selectedNode ? inst.selectedNode.nodeName : null, 'dep'); h += addRenderInfo('targetElement', inst.targetElement ? inst.targetElement.nodeName : null); h += addRenderInfo('getBody().nodeName', inst.getBody() ? inst.getBody().nodeName : null); h += addRenderInfo('getBody().getAttribute("id")', inst.getBody() ? inst.getBody().getAttribute("id") : null); h += addRenderInfo('getDoc().location', inst.getDoc() ? inst.getDoc().location : null); h += addRenderInfo('startContent', inst.startContent); h += addRenderInfo('isHidden()', inst.isHidden()); h += addRenderInfo('isDirty()', inst.isDirty()); h += addRenderInfo('undoRedo.undoLevels.length', inst.undoRedo.undoLevels.length); h += addRenderInfo('undoRedo.undoIndex', inst.undoRedo.undoIndex); h += addRenderInfo('selection.getSelectedHTML()', inst.selection.getSelectedHTML()); h += addRenderInfo('selection.isCollapsed()', inst.selection.isCollapsed() || 'false'); h += addRenderInfo('selection.getSelectedText()', inst.selection.getSelectedText()); h += addRenderInfo('selection.getFocusElement().nodeName', inst.selection.getFocusElement().nodeName); h += addRenderInfo('selection.getFocusElement().outerHTML', tinyMCE.getOuterHTML(inst.selection.getFocusElement())); if ((tinyMCE.isGecko || tinyMCE.isOpera) && sel && rng) { h += addRenderInfo('selection.getSel().anchorNode.nodeName', sel.anchorNode ? sel.anchorNode.nodeName : null, 'bspec'); h += addRenderInfo('selection.getSel().anchorOffset', sel.anchorOffset, 'bspec'); h += addRenderInfo('selection.getSel().focusNode.nodeName', sel.focusNode ? sel.focusNode.nodeName : null, 'bspec'); h += addRenderInfo('selection.getSel().focusOffset', sel.focusOffset, 'bspec'); h += addRenderInfo('selection.getRng().startContainer.nodeName', rng.startContainer ? rng.startContainer.nodeName : null, 'bspec'); h += addRenderInfo('selection.getRng().startOffset', rng.startOffset, 'bspec'); h += addRenderInfo('selection.getRng().endContainer.nodeName', rng.endContainer ? rng.endContainer.nodeName : null, 'bspec'); h += addRenderInfo('selection.getRng().endOffset', rng.endOffset, 'bspec'); } if (typeof(rng.item) != 'undefined' || typeof(rng.htmlText) != 'undefined') { if (!rng.item) { h += addRenderInfo('selection.getSel().type', sel.type, 'bspec'); h += addRenderInfo('selection.getRng().htmlText', rng.htmlText, 'bspec'); h += addRenderInfo('selection.getRng().text', rng.text, 'bspec'); } else h += addRenderInfo('selection.getRng().item(0).nodeName', rng.item(0).nodeName, 'bspec'); } h += '
'; } h += '

Fields marked in gray is not cross browser and should be used with care.

'; h += '

Fields marked red are marked deprecated and will be removed in the future.


'; se.innerHTML = h; } function addRenderInfo(n, v, c) { return '' + n + ''; } function renderSettings() { var se = document.getElementById('settings'), n, sn, inst, h = '', v; for (n in tinyMCE.instances) { inst = tinyMCE.instances[n]; if (!tinyMCE.isInstance(inst)) continue; h += '

Instance id: ' + inst.editorId + '

'; h += ''; for (sn in inst.settings) { v = inst.settings[sn]; h += ''; } h += '
' + tinyMCE.xmlEncode(sn) + '
'; } se.innerHTML = h; } function renderContent() { var se = document.getElementById('content'), n, inst, h = ''; for (n in tinyMCE.instances) { inst = tinyMCE.instances[n]; if (!tinyMCE.isInstance(inst)) continue; h += '

Instance id: ' + inst.editorId + '

'; h += '

Start content - inst.startContent:

'; h += '
' + tinyMCE.xmlEncode(inst.startContent) + '
'; h += '

Raw content - inst.getBody().innerHTML or inst.getHTML(true):

'; h += '
' + tinyMCE.xmlEncode(inst.getHTML(true)) + '
'; h += '

Cleaned content - inst.getHTML():

'; h += '
' + tinyMCE.xmlEncode(inst.getHTML()) + '
'; if (inst.serializedHTML) { h += '

Serialized HTML content - inst.serializedHTML:

'; h += '
' + tinyMCE.xmlEncode(inst.serializedHTML) + '
'; } } se.innerHTML = h; } function renderCommandStates() { var se = document.getElementById('command_states'), n, inst, h = '', v, ex; var cmds = new Array('2D-Position','AbsolutePosition','BackColor','BlockDirLTR','BlockDirRTL','Bold','BrowseMode','Copy','CreateBookmark','CreateLink','Cut','Delete','DirLTR','DirRTL','EditMode','enableInlineTableEditing','enableObjectResizing','FontName','FontSize','ForeColor','FormatBlock','Indent','InsertButton','InsertFieldset','InsertHorizontalRule','InsertIFrame','InsertImage','InsertInputButton','InsertInputCheckbox','InsertInputFileUpload','InsertInputHidden','InsertInputImage','InsertInputPassword','InsertInputRadio','InsertInputReset','InsertInputSubmit','InsertInputText','InsertMarquee','InsertOrderedList','InsertParagraph','InsertSelectDropdown','InsertSelectListbox','InsertTextArea','InsertUnorderedList','Italic','JustifyCenter','JustifyFull','JustifyLeft','JustifyNone','JustifyRight','LiveResize','MultipleSelection','Open','Outdent','OverWrite','Paste','PlayImage','Redo','Refresh','RemoveFormat','SaveAs','SelectAll','SizeToControl','SizeToControlHeight','SizeToControlWidth','Stop','StopImage','StrikeThrough','styleWithCSS','Subscript','Superscript','UnBookmark','Underline','Undo','Unlink','Unselect'), i; for (n in tinyMCE.instances) { inst = tinyMCE.instances[n]; if (!tinyMCE.isInstance(inst)) continue; h += '

Instance id: ' + inst.editorId + '

'; h += ''; for (i=0; i'; } h += '
'; } se.innerHTML = h; } function renderUndoRedo() { var se = document.getElementById('undo_redo'), inst, n, h = '', i, le, id, d, ur; var f = document.forms[0]; if (tinyMCE.undoLevels) { le = tinyMCE.undoLevels; h += '

Global undo/redo

'; h += ''; h += ''; h += ''; h += '
undoLevels.length' + le.length + '
undoIndex' + tinyMCE.undoIndex + '
'; for (i=0; i'; } for (n in tinyMCE.instances) { inst = tinyMCE.instances[n]; if (!tinyMCE.isInstance(inst)) continue; ur = inst.undoRedo; le = ur.undoLevels; h += '

Instance id: ' + inst.editorId + '

'; h += ''; h += ''; h += ''; h += ''; h += ''; h += '
undoLevels.length' + le.length + '
undoIndex' + ur.undoIndex + '
typingUndoIndex' + ur.typingUndoIndex + '
undoRedo' + ur.undoRedo + '
'; for (i=0; i'; h += '
' + tinyMCE.xmlEncode(le[i].content) + '
'; if (i > 0 && f.undo_diff.checked) { d = diff_main(i > 0 ? le[i-1].content.replace(/[\r\n]+/g, '') : null, le[i].content.replace(/[\r\n]+/g, ''), false); diff_cleanup_semantic(d); h += '

Diff ' + (i-1) + ',' + i + '

' + diff_prettyhtml(d) + '
'; } } } se.innerHTML = h; } function clearLog() { document.getElementById('log').innerHTML = ''; devkit._startTime = null; } function cancelAction() { parent.document.getElementById('devkit').style.display = 'none'; } function toggleDebugEvents(s) { devkit._debugEvents(s); } function storeSelection() { book = tinyMCE.selectedInstance.selection.getBookmark(); return false; } function restoreSelection() { tinyMCE.selectedInstance.selection.moveToBookmark(book); return false; }