16 Commits

Author SHA1 Message Date
Tom
e19ddc10d3 make revision and renderer svg to shrink to box but not enlarge 2022-04-19 00:21:29 +02:00
Tom
9771b441ad missing path2d support for freedawings, remove node-side rendering, allow async getContent()
* ## Excalidraw and SVG
 * 2022-04-16 - @thfrei
 *
 * Known issues:
 *  - excalidraw-to-svg (node.js) does not render any hand drawn (freedraw) paths. There is an issue with
 *    Path2D object not present in node-canvas library used by jsdom. (See Trilium PR for samples and other issues
 *    in respective library. Link will be added later). Related links:
 *     - https://github.com/Automattic/node-canvas/pull/2013
 *     - https://github.com/google/canvas-5-polyfill
 *     - https://github.com/Automattic/node-canvas/issues/1116
 *     - https://www.npmjs.com/package/path2d-polyfill
 *  - excalidraw-to-svg (node.js) takes quite some time to load an image (1-2s)
 *  - excalidraw-utils (browser) does render freedraw, however NOT freedraw with background
 *
 * Due to this issues, we opt to use **only excalidraw in the frontend**. Upon saving, we will also get the SVG
 * output from the live excalidraw instance. We will save this **SVG side by side the native excalidraw format
 * in the trilium note**.
 *
 * Pro: we will combat bit-rot. Showing the SVG will be very fast, since it is already rendered.
 * Con: The note will get bigger (maybe +30%?), we will generate more bandwith.
 *      (However, using trilium desktop instance, does not care too much about bandwidth. Size increase is probably
 *       acceptable, as a trade off.)
2022-04-19 00:21:20 +02:00
Thomas Frei
300f4ad357 remove obsolete comments / code 2022-04-19 00:13:27 +02:00
Tom
f08afd4723 remove empty line break 2022-04-19 00:13:27 +02:00
Tom
27d0388d79 add some comments 2022-04-19 00:13:26 +02:00
Tom
025032de42 make note revisions work 2022-04-19 00:13:26 +02:00
zadam
79a85a0aa7 refactored TabContext => NoteContext 2021-05-22 12:35:41 +02:00
Jules-Bertholet
a410ed1b74
Update KaTeX to v0.13.9 (#1925)
* Update KaTeX to v0.13.9

* Allow KaTeX commands like \url and \includegraphics
https://katex.org/docs/options.html
2021-05-08 20:58:56 +02:00
zadam
f988935a33 fixed & refactored opening/downloading file notes 2020-11-05 21:26:24 +01:00
zadam
8e8148ce42 fix math rendering in note revisions, fixes #1359 2020-10-30 15:06:11 +01:00
zadam
a1ec6fe0aa fix file preview in note revisions dialog 2020-10-13 23:09:57 +02:00
zadam
0e4eec10b9 added "restore this revision" button 2020-05-07 23:34:13 +02:00
zadam
a3661cb763 fix display of buttons for revisions when there is none 2020-05-07 23:14:21 +02:00
zadam
115879ec4a fix note revisions displaying wrong tooltip 2020-05-07 23:02:46 +02:00
zadam
5c35b870eb added titles with full date time including timezone offset also to note revisions dialog/widget 2020-05-01 00:01:53 +02:00
zadam
29cec8112e fix setup of new document, closes #966 2020-04-14 21:57:42 +02:00