Repository navigation
New plugin: Canvas View — support obsidian like .canvas files inside NotePlan - #785
lifeplayer67 wants to merge 1 commit into
Conversation
|
@EduardMe please use your plugin review skill on this submission. |
|
Hi @lifeplayer67, thank you for the Canvas View plugin. It is a useful feature, and the code is well organized. Repository: We do not add community plugins to this repository anymore, we have introduced "Community Plugins" some time ago. Here is what you need to do: Please move the plugin to your own GitHub repository. Then do these steps:
For an example, see https://github.com/EduardMe/noteplan-stock-ticker-plugin and its entry in Before we can add the plugin to the list, please make these changes: Required
The When you publish the release, add a comment here. We will then do a new review. Thank you! |
…suite Address review feedback on NotePlan#785: - HTML/SVG injection: colors are validated (preset digit or #hex only) and node geometry is coerced to finite numbers before it reaches style/SVG attributes; applied on boot, undo/redo restore and clipboard paste. - Write path: saveCanvas only writes to canvases registered by the plugin in this session, with a strict fallback (inside Notes, *.canvas, no '..') for panes restored after an app restart. - Link previews: iframe sandbox tightened to full restrictions (no scripts, no same-origin) — third-party pages can no longer run code in the plugin window. Also: 11 jsdom interaction tests driving the real client (selection, drag, rubber-band, group frame/interior semantics, delete/undo/redo, Cmd+G, double-click create/edit) plus injection-guard unit tests — 26 tests total.
0d31672 to
a39d11f
Compare
|
Hi @EduardMe, thanks for the review! Finally I have time to solve your comments, so:
|
|
Hi @lifeplayer67, thank you for the update and the new tests! The repo move, the release, the write-path check and the sandboxed previews all look good. One thing is still open before we can add the plugin to the list: Node type is not escaped. In The fix is small: in sanitizeCanvas, allow only text, file, link and group, and drop or convert other nodes. A test for it next to your other injection tests would be great. Optional, if you have a minute: showdown does not filter link URLs, so x in a text card becomes a clickable javascript: link. Keeping only http(s), mailto:, # and relative links after makeHtml (the same rule as for link cards) closes that too. This one needs a click, so we will not block the plugin on it. When the fix is released, add a comment here and we will add the plugin. Thank you! |
Canvas View edits Obsidian Canvas (.canvas / JSON Canvas) files inside NotePlan. Plugin lives at lifeplayer67/noteplan-canvas-view, release v1.0.0.
a39d11f to
4a0df95
Compare
|
Hi! First of all, thanks for the great app and flexible plugin system. I migrated to it from Obsidian. I like its native integration with Apple infra and all my calendars. A few things I was missing:
Sorry for doing all of that without discussion. I have ADHD and I would never finish it any other way. It implements almost all canvas features (I list what it doesn't below):
What it doesn't support:
{in the notes list. In addition, I cannot assign the canvas view as the default one for those files, so NotePlan opens the JSON content. This one is critical in my opinion. It would be great to support it natively.I hope you will like it. Let me know if you have any questions or requests.