diff --git a/xpfe/AppCores/xul/EditorAppShell.xul b/xpfe/AppCores/xul/EditorAppShell.xul index 6c9f9a39584b..10c76a35de43 100755 --- a/xpfe/AppCores/xul/EditorAppShell.xul +++ b/xpfe/AppCores/xul/EditorAppShell.xul @@ -77,6 +77,9 @@ + + + diff --git a/xpfe/AppCores/xul/EditorCommands.js b/xpfe/AppCores/xul/EditorCommands.js index ff98b3a04e70..335418d485dd 100644 --- a/xpfe/AppCores/xul/EditorCommands.js +++ b/xpfe/AppCores/xul/EditorCommands.js @@ -207,6 +207,54 @@ } + function EditorTestSelection() + { + appCore = XPAppCoresManager.Find(editorName); + if (appCore != null) + { + dump("Testing selection\n"); + var selection = appCore.editorSelection; + if (selection) + { + dump("Got selection\n"); + var firstRange = selection.getRangeAt(0); + if (firstRange) + { + dump("Range contains \""); + dump(firstRange.toString() + "\"\n"); + } + } + + } + else + { + dump("EditorAppCore has not been created!\n"); + } + } + + function EditorTestDocument() + { + appCore = XPAppCoresManager.Find(editorName); + if (appCore != null) + { + dump("Getting document\n"); + var theDoc = appCore.editorDocument; + if (theDoc) + { + dump("Got the doc\n"); + dump("Document name:" + theDoc.nodeName + "\n"); + dump("Document type:" + theDoc.doctype + "\n"); + } + else + { + dump("Failed to get the doc\n"); + } + } + else + { + dump("EditorAppCore has not been created!\n"); + } + } /* Status calls */ function onBoldChange()