shortcut: shift + x = toggle strikethrough and fade text
[apps/outliner/.git] / src / client.ts
index c02d2b78bcd67e6bf867a9aaaba548534a41bd28..9b4c5b495839b0f24574f34f1c7cc14c198e1d22 100644 (file)
@@ -192,6 +192,14 @@ keyboardJS.withContext('navigation', () => {
     keyboardJS.setContext('editing');
   });
 
+  keyboardJS.bind('shift + x', e => {
+    e.preventDefault();
+    // toggle "strikethrough" of node
+    cursor.get().classList.toggle('strikethrough');
+    outline.data.contentNodes[cursor.getIdOfNode()].strikethrough = cursor.get().classList.contains('strikethrough');
+    save();
+  });
+
   keyboardJS.bind('tab', e => {
     e.preventDefault();