Previously we'd use the remove-markdown package to create the note
preview however this function would freeze on certain notes, and was
probably unsafe as it used regex to parse Markdown. Replaced this in
favour of Markdown-it along with htmlparser2 to strip all markup from a
note.
The implementation uses / symbol as a nesting separator. I.e. tag/subtag is a nested tag, where tag is the parent tag and subtag is its child. Creating a tag named tag/subtag/subsubtag creates three tags, one for each level. The tags are associated using parent_id field.
In the app, viewing notes with a tag will also show all notes that are associated with any of the tag's descendant tags (same for the note count). Deleting a tag will also delete all its descendant tags.
In the desktop app the tags are shown nested just like the notebooks.
The goal is to make the command system more modular, so each command can
be defined as a single object that includes a declaration (name, label,
etc.) and a runtime (to execute the command, test if it should be
enabled, etc.)
Utility methods are provided to convert a command to a menu item or a
toolbar button, thus reducing duplicated and boiler plate code across the
codebase (often the menu item logic was duplicated in the toolbar
button logic and vice versa).
The goal is to make it easier to add new commands (and associated menu
item and toolbar buttons) and to call them from
anywhere. This is also useful for plugins, which can also easily define
new commands.
Could also allow creating a command palette.
* Manually refresh codemirror whenever the parent div size changes
* Set editor width through style rather than adding an extra property
* use Memo for editorStyle
- previously getLineSpan was included line text as a token (dumb
oversight)
- the regex was updated to include a space after a OL element (was
missing for some reason)
Reverts 468261906a
Disabling the toolbar when the editor is not in focus means it
was disabled when trying to click on one of the button, because
the editor loses focus before the click event is processed.
* Add support for editable resources
* Fixed handling of resource paths
* Add delay before saving resource
* Delete temp files and stop watching when switching notes
* Handle sync when resource has been edited
* Handle resource conflicts
* Refactoring and handle conflicts from edit watcher
* Added test unit for conflict handling when deleting resource
* Trying to fix Travis-ci test units
* Fixed typo
* Update TinyMCE.tsx
* Update AsyncActionQueue.ts