4 ms·
This is fantastic. I've always used JavE before but this being a single HTML file is a big+ and packs quite a punch. Kudos to the author! One question though,
by dimenoz 2y ago
This is fantastic. I've always used JavE before but this being a single HTML file is a big+ and packs quite a punch. Kudos to the author!
One question though, how do edit the content later? For example I generated a few diagrams one at a time and pasted those in a local plain text file. Later when I want to edit a particular diagram/part, I tried copy pasted it in, but always got "cannot paste, content leaves canvas" error. If I tried copy-pasting a really small section (e.g. 3x3 table), it pasted it right in the center. Anyway, not sure if that's an intended work flow or not. Great job regardless.
- ftr1200 2y agoGlad you asked. Have you checked the online version https://cascii.app https://cascii.app There, all exported drawings come with a short link. This is so that months later anyone reading / seeing can edit their own copy online / keep it up to date. You can also create an account to manage your own drawings. Side note - when you use real pasting, it will not remember meaningful information (that's very hard to do elegantly). In your example, I'm guessing that 3x3 table you pasted in could not be properly edited like a table again. Hence, use short links so that Cascii remembers state.
- dimenoz 2y agoMakes sense. Thank you for making and sharing this.
- ftr1200 2y agov1.0.1 now has offline import/export https://github.com/casparwylie/cascii-core https://github.com/casparwylie/cascii-core
- ssriram 2y agoHi, great app. I'd love to understand how you are maintaining state behind that short url and see if there are ways (sans server) to at least partially recreate state from the exported ascii. Having an Import from clipboard would truly make this a remarkable app.
- ssriram 2y agoAfter uploading cascii.html to deepseek.com and promptCoding with it, I saw that you had the json representaion in localStorage. I tried generating the json from the ascii exported to the clipboard but see why this could get very tricky. So, I added an Export (JSON) to file and Import (JSON) from file and placed them in a More Popup component in which I put the existing export button, so the menu bar does not get too crowded. (for code see (1)) - This now allows me to save the json and import/edit it at a later time - no short url needed and the data stays private. Your code was well laid out and deepseek was able to make all the changes error-free. (1) https://github.com/ssr1ram/cascii-core/tree/more-export-import-file https://github.com/ssr1ram/cascii-core/tree/more-export-impo...
- ftr1200 2y agoNice! Yea it should be easy to use the internal layerManager.import and .encodeAll This might break state for the online version, but I can do some tweaks and get it merged if you open the PR. to be clear, the short url feature is useful in that other people can easily edit / update diagrams they see referenced in code comments. If privacy is a concern and you're not distributing the diagram, then indeed exporting JSON is a good way to go.
- ssriram 2y agoHaving an AI engine understand ascii diagrams and output the JSON would be ideal. Till then here is the PR (1) for a simple import and export. (1) https://github.com/casparwylie/cascii-core/pull/5 https://github.com/casparwylie/cascii-core/pull/5
- harvie 2y agoExactly. Make it importable and i am sold. Maybe base64 encoded metadata under the diagram? Maybe encode in non-printable characters? Maybe just use non-printable characters to hint where the corners of objects are?
- ftr1200 2y ago