diff --git a/experiments/outline-editor/editor.css b/experiments/outline-editor/editor.css index 126aa51..d52937a 100755 --- a/experiments/outline-editor/editor.css +++ b/experiments/outline-editor/editor.css @@ -408,6 +408,14 @@ editor .outline .block:focus { } +/*---------------------------------------------------------- Done ---*/ + +.editor .outline .block.DONE>.view { + text-decoration: line-through; + opacity: 0.5; +} + + /*--------------------------------------------------- Highlightes ---*/ .editor .outline .highlight { diff --git a/experiments/outline-editor/editor.js b/experiments/outline-editor/editor.js index f29c79b..6bec061 100755 --- a/experiments/outline-editor/editor.js +++ b/experiments/outline-editor/editor.js @@ -26,8 +26,17 @@ var atLine = function(elem, index){ //--------------------------------------------------------------------- +// Plugins... +// general helpers and utils... var plugin = { + encode: function(text){ + return text + .replace(/(?/g, '>') + .replace(/\\(?!`)/g, '\\\\') }, + // XXX make this more generic... style: function(editor, elem, style, code=undefined){ style = [style].flat() @@ -43,7 +52,6 @@ var plugin = { } - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - var attributes = { @@ -89,6 +97,8 @@ var blocks = { .replace(/^\s*(?\s+(.*)$/m, this.style(editor, elem, 'quote')) .replace(/^\s*(?/g, '>') - .replace(/\\(?!`)/g, '\\\\') }, - // can be used in: // .replace(quoted.pattern, quoted.handler) quote_pattern: /(?code` - code blocks ```javascript