mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-16 16:11:39 +00:00
added markdown filter... (working but not without issues)
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
347c69ff13
commit
ae7df95c40
4
ext-lib/showdown.min.js
vendored
Executable file
4
ext-lib/showdown.min.js
vendored
Executable file
File diff suppressed because one or more lines are too long
@ -7,6 +7,8 @@
|
||||
</style>
|
||||
|
||||
<script src="ext-lib/jquery.js"></script>
|
||||
<script src="ext-lib/showdown.min.js"></script>
|
||||
|
||||
<script src="ext-lib/pouchdb.min.js"></script>
|
||||
<script src="ext-lib/peer.min.js"></script>
|
||||
|
||||
|
||||
18
wiki.js
18
wiki.js
@ -228,6 +228,14 @@ var macro = {
|
||||
wikiword: function(context, elem){
|
||||
return $('<span>')
|
||||
.html(setWikiWords($(elem).html(), true, this.__include_marker__)) },
|
||||
|
||||
|
||||
// XXX move this to a plugin...
|
||||
markdown: function(context, elem){
|
||||
var converter = new showdown.Converter()
|
||||
|
||||
return $('<span>').html(converter.makeHtml($(elem).html()))
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@ -512,7 +520,10 @@ var data = {
|
||||
text: '\n'
|
||||
+'<!-- place filters here so as not to takup page space: ... -->\n'
|
||||
+'\n'
|
||||
+'<div>@include(../path) (<a href="#./_edit">edit</a>)</div>\n'
|
||||
+'<div>\n'
|
||||
+'<a href="#tree">☰</a> \n'
|
||||
+'@include(../path) (<a href="#./_edit">edit</a>)\n'
|
||||
+'</div>\n'
|
||||
+'<hr>\n'
|
||||
+'<h1 class="title" contenteditable tabindex="0">'
|
||||
//+'<slot name="title">@include(../title)</slot>'
|
||||
@ -528,7 +539,10 @@ var data = {
|
||||
text: '\n'
|
||||
+'<!-- @filter(-wikiword) -->\n'
|
||||
+'\n'
|
||||
+'<div>@include(../path) (<a href="#..">view</a>)</div>\n'
|
||||
+'<div>'
|
||||
+'<a href="#tree">☰</a> \n'
|
||||
+'@include(../path) (<a href="#..">view</a>)\n'
|
||||
+'</div>\n'
|
||||
+'<hr>\n'
|
||||
+'<h1 class ="title" contenteditable>@include(../title)</h1>\n'
|
||||
+'<br>\n'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user