https://github.com/divbit/grimoire
Example output pdf for sharing:
You can also style the notes by simply dropping a <style> some css element { some css thing: some number } <style> at the top of the note, which can make for decent good looking documents (on par with word etc if you are a css wizard). Also it has built in spaced repetition studying thing, which (the code is there, but I'm in the slow process of debugging it since I messed it up when I moved the state to redux, so it will be back in the next few commits).
You can copy/paste images to there, and write with markdown / latex, which is why I wrote it, since I couldn't find anything that did all those things conveniently.