r1540 - branches/bxe_2_0/plugins
[email protected] Fri, 13 Oct 2006 12:03:41 +0200 (CEST)
| Newsgroups | gmane.editors.bitflux.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: chregu
Date: Fri Oct 13 12:03:40 2006
New Revision: 1540
Modified:
branches/bxe_2_0/plugins/ClipboardPasteDialog.js
Log:
improvements for better clipboard support
Modified: branches/bxe_2_0/plugins/ClipboardPasteDialog.js
==============================================================================
--- branches/bxe_2_0/plugins/ClipboardPasteDialog.js (original)
+++ branches/bxe_2_0/plugins/ClipboardPasteDialog.js Fri Oct 13 12:03:40 2006
@@ -44,6 +44,8 @@
var ac = selNode.parentNode.allowedChildren;
var _chooser = new Array();
var _eles = new Array();
+ _chooser.push("Insert as text");
+ _eles["Insert as text"] = "__text__";
for (i = 0; i < ac.length; i++) {
if (ac[i].nodeType != 3 && ac[i].vdom.bxeClipboard ) {
_chooser.push(ac[i].vdom.bxeName);
@@ -55,5 +57,27 @@
mod.addItem("clipboard", "", "textarea");
mod.addItem("element", "", "select",null,_chooser,false);
mod.show(100,50,"fixed");
+ document.getElementById("modalBoxclipboard").focus();
+ document.addEventListener("keypress", BxeTextClipboard_keyhandler, true);
}
+
+function BxeTextClipboard_keyhandler(event) {
+
+ if(event.ctrlKey || event.metaKey) {
+ if(!event.charCode)
+ return false;
+
+ if(String.fromCharCode(event.charCode).toLowerCase() == "b")
+ {
+ event.stopPropagation();
+ event.returnValue = false;
+ event.preventDefault();
+ document.removeEventListener("keypress", BxeTextClipboard_keyhandler, true);
+ document.getElementById("ModalBoxForm").focus();
+ document.getElementById("__submit").click();
+
+ return false;
+ }
+ }
+}
--
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs