Comments (9)
As of commit 4829902, we now render images given by ![alt text](local path)
markdown. Consider this a (very simple) first step to support this.
from notekit.
You mean to embed images (png, bmp, whatever) into the document? Not at the moment. It's planned; I just need to figure out a good way of storing them (should they be forced inline with long data:
URI blobs, or should notekit create a separate subfolder to store embedded images in?).
You should be able to copy and paste your own drawings without issue.
from notekit.
Yes, I meant that.
I think it would be better if they're inlined. This way if you can continue treating the .md files like a single entity. Containing all data.
Just like word, .doc documents.
from notekit.
Yeah, but if a big image is included, the resulting markdown file will become basically unusable in any plain text editor (like, you'd have a single line with hundreds of thousands of characters of alphanumeric garbage). #38 also suggests that some other markdown-processing tools don't play nice with them...
from notekit.
@blackhole89 I think you're right. Most Markdown software support images with web or local links, I think we should change to it too. The way things are now, we can't copy/paste easily the images (we get the base64 encoded image). The only way I think to get the drawings out of notekit is by screen printing them, which is really hard.
I think we can't do it like word with .doc documents without sacrificing simplicity and interoperability with other markdown editors.
I've changed my mind. The only way I see it, is to create a separate subbfolder, like you said.
from notekit.
As of commit 4829902, we now render images given by
![alt text](local path)
markdown. Consider this a (very simple) first step to support this.
Cool I've been waiting for this. Obviously, this is a very early implementation and major things (like resizing) are missing, but its a first step. Something I've noticed is that it doesn't work with spaces in the file path, that's a bit annoying because gnome shell saves screenshot names with a few spaces.
from notekit.
resizing
How'd you even handle resizing? You'd have to store the size info in the document, but does Markdown have any standardised way of representing the size of an embedded image?
spaces
Does the Markdown spec allow those? (I took the parser from GtkSourceView's language definition, so whether it's legit is anyone's guess.) I could imagine that the image location is considered a "URL", so in particular has to be URL-encoded (representing spaces as + or %20)... (not that I'd be particularly bothered to deviate from the spec here and support spaces if it does; it seems like the parse would still be unambiguous)
By the way, the commit above might serve as a good piece of (loud scare quotes) "documentation" insofar as it represents a more or less minimal diff to add a new piece of syntax that is rendered to a widget when the cursor is not near it.
from notekit.
How'd you even handle resizing?
Well, that's a though one. I came up with these two:
- Abusing the alt tag, as (as far as I can tell) NoteKit isn't doing anything with it.
- Add some kind of block-comment infront of the image (but afaik notekit is just rendering comments currently)
from notekit.
Implemented in master
now.
from notekit.
Related Issues (20)
- shortcuts for formatting elements HOT 1
- Segmentation fault when running as non-root on Arch Linux HOT 3
- Better syntax highlight HOT 1
- [enhancement] Keyboard shortcut for eraser, brush size, pen, colors, etc HOT 10
- Blockquotes not follows theme change HOT 1
- free(): invalid pointer HOT 1
- FR: support OPML files HOT 3
- Get error, HOT 1
- Cannot add PPA: ''This PPA does not support jammy''. ubuntu 22.04
- cannot install on debian HOT 6
- through compiling it, the app won't run HOT 1
- Can't download the windows file HOT 1
- Fail to build on MacOS HOT 10
- ability to change font size
- notekit_0.2_amd64 has (false) unmet dependency on Ubuntu Jammy onwards. HOT 5
- zip link given in readme is not working HOT 1
- features needed HOT 1
- Sync notes from other sources HOT 3
- Cannot add PPA: ''This PPA does not support jammy''. HOT 3
- How the fuck do you install this? HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from notekit.