Commit 3f6f0c96bdbbd8307fb9e5459b6857870001abfc
use ssb-markdown feature which allows creation of clickable image links
mix irving committed on 1/21/2017, 10:06:35 PMParent: 9a9a0d3a4b6091ad5a05671399f0137eaee72ada
Files changed
config.js | changed |
modules_basic/markdown.js | changed |
package.json | changed |
config.js | ||
---|---|---|
@@ -23,10 +23,10 @@ | ||
23 | 23 … | else |
24 | 24 … | blobsUrl = 'http://localhost:8989/blobs/get' |
25 | 25 … | |
26 | 26 … | return { |
27 | - remote: remote, | |
28 | - blobsUrl: blobsUrl | |
27 … | + remote, | |
28 … | + blobsUrl | |
29 | 29 … | } |
30 | 30 … | } |
31 | 31 … | |
32 | 32 … |
modules_basic/markdown.js | |||
---|---|---|---|
@@ -32,12 +32,13 @@ | |||
32 | 32 … | ||
33 | 33 … | var md = h('div.markdown') | |
34 | 34 … | md.innerHTML = markdown.block(content.text, { | |
35 | 35 … | emoji: renderEmoji, | |
36 | - toUrl: function (id) { | ||
36 … | + toUrl: (id) => { | ||
37 | 37 … | if(ref.isBlob(id)) return api.blob_url(id) | |
38 | 38 … | return '#'+(mentions[id]?mentions[id]:id) | |
39 | - } | ||
39 … | + }, | ||
40 … | + imageLink: (id) => '#' + id | ||
40 | 41 … | }) | |
41 | 42 … | ||
42 | 43 … | return md | |
43 | 44 … |
package.json | ||
---|---|---|
@@ -50,9 +50,9 @@ | ||
50 | 50 … | "ssb-feed": "^2.2.1", |
51 | 51 … | "ssb-git": "^0.4.1", |
52 | 52 … | "ssb-keys": "^6.1.0", |
53 | 53 … | "ssb-links": "^2.0.0", |
54 | - "ssb-markdown": "^3.0.0", | |
54 … | + "ssb-markdown": "^3.1.1", | |
55 | 55 … | "ssb-mentions": "^0.1.0", |
56 | 56 … | "ssb-query": "^0.1.1", |
57 | 57 … | "ssb-ref": "^2.6.2", |
58 | 58 … | "ssb-sort": "^1.0.0", |
Built with git-ssb-web