color: #000;
background-color: #fff;
}
+.strikethrough, .strikethrough .node {
+ text-decoration: line-through;
+ color: #808080;
+}
footer {
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();
created: number;
type: 'text',
content: string,
+ strikethrough: boolean;
};
export class Outline {
id: uuid(),
created: Date.now(),
type: 'text',
- content: '---'
+ content: '---',
+ strikethrough: false
};
this.data.contentNodes[outlineNode.id] = outlineNode;
id: uuid(),
created: Date.now(),
type: 'text',
- content: '---'
+ content: '---',
+ strikethrough: false
};
if(!nodeId) {
id: node.id,
created: Date.now(),
type: 'text',
- content: ''
+ content: '',
+ strikethrough: false
};
- let html = `<div class="node ${collapse}" data-id="${node.id}" id="id-${node.id}">
+ const strikethrough = content.strikethrough ? 'strikethrough' : '';
+
+ let html = `<div class="node ${collapse} ${strikethrough}" data-id="${node.id}" id="id-${node.id}">
<div class="nodeContent" data-type="${content.type}">
${this.renderContent(node.id)}
</div>