mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-18 00:51:38 +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(() => {
|
.blur(() => {
|
||||||
reload()
|
reload()
|
||||||
})
|
})
|
||||||
|
.text($('.raw').html())
|
||||||
}
|
}
|
||||||
|
|
||||||
var go = (path) => {
|
var go = (path) => {
|
||||||
|
|||||||
9
wiki.js
9
wiki.js
@ -222,7 +222,8 @@ var macro = {
|
|||||||
.replace(/\s*\/\/.*$|\s*\/\*(.|[\n\r])*?\*\/\s*/mg, '')) },
|
.replace(/\s*\/\/.*$|\s*\/\*(.|[\n\r])*?\*\/\s*/mg, '')) },
|
||||||
|
|
||||||
// XXX
|
// 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){
|
wikiword: function(context, elem){
|
||||||
return $('<span>')
|
return $('<span>')
|
||||||
@ -532,10 +533,8 @@ var data = {
|
|||||||
+'<h1 class ="title" contenteditable>@include(../title)</h1>\n'
|
+'<h1 class ="title" contenteditable>@include(../title)</h1>\n'
|
||||||
+'<br>\n'
|
+'<br>\n'
|
||||||
+'<code><pre class="raw" saveto=".." contenteditable>@source(../raw)</pre></code>\n'
|
+'<code><pre class="raw" saveto=".." contenteditable>@source(../raw)</pre></code>\n'
|
||||||
// XXX avoid this...
|
+'<hr>\n'
|
||||||
+'<script>\n'
|
+'<a href="#/">home</a>\n'
|
||||||
+'\t$(".raw").text($(".raw").html())\n'
|
|
||||||
+'</script>\n'
|
|
||||||
+'',
|
+'',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user