mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-17 00:21:40 +00:00
bugfixes and minor tweaks + scripts are no longer needed for _edit template...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
da7a1f446f
commit
0d228baba6
@ -80,6 +80,7 @@ var update_editor = function(){
|
||||
.blur(() => {
|
||||
reload()
|
||||
})
|
||||
.text($('.raw').html())
|
||||
}
|
||||
|
||||
var go = (path) => {
|
||||
|
||||
9
wiki.js
9
wiki.js
@ -222,7 +222,8 @@ var macro = {
|
||||
.replace(/\s*\/\/.*$|\s*\/\*(.|[\n\r])*?\*\/\s*/mg, '')) },
|
||||
|
||||
// XXX
|
||||
//nl2br: function(context, text){ return $('<div>').html(text.replace(/\n/g, '<br>\n')) },
|
||||
nl2br: function(context, elem){
|
||||
return $('<div>').html($(elem).html().replace(/\n/g, '<br>\n')) },
|
||||
|
||||
wikiword: function(context, elem){
|
||||
return $('<span>')
|
||||
@ -532,10 +533,8 @@ var data = {
|
||||
+'<h1 class ="title" contenteditable>@include(../title)</h1>\n'
|
||||
+'<br>\n'
|
||||
+'<code><pre class="raw" saveto=".." contenteditable>@source(../raw)</pre></code>\n'
|
||||
// XXX avoid this...
|
||||
+'<script>\n'
|
||||
+'\t$(".raw").text($(".raw").html())\n'
|
||||
+'</script>\n'
|
||||
+'<hr>\n'
|
||||
+'<a href="#/">home</a>\n'
|
||||
+'',
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user