1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-18 16:25:13 +00:00

Introduce text editor toolbar (#2315)

Tada!
This commit is contained in:
Jeremy Ruston
2016-04-22 08:36:29 +01:00
parent 4dd701c2dd
commit 2adf09129d
234 changed files with 3899 additions and 999 deletions

View File

@@ -41,7 +41,7 @@ KeyboardWidget.prototype.render = function(parent,nextSibling) {
domNode.className = classes.join(" ");
// Add a keyboard event handler
domNode.addEventListener("keydown",function (event) {
if($tw.utils.checkKeyDescriptor(event,self.keyInfo)) {
if($tw.keyboardManager.checkKeyDescriptors(event,self.keyInfoArray)) {
self.invokeActions(this,event);
self.dispatchMessage(event);
event.preventDefault();
@@ -68,7 +68,7 @@ KeyboardWidget.prototype.execute = function() {
this.message = this.getAttribute("message");
this.param = this.getAttribute("param");
this.key = this.getAttribute("key");
this.keyInfo = $tw.utils.parseKeyDescriptor(this.key);
this.keyInfoArray = $tw.keyboardManager.parseKeyDescriptors(this.key);
this["class"] = this.getAttribute("class");
// Make child widgets
this.makeChildWidgets();