mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-29 10:00:08 +00:00
experimenting with native multi-mode editor (.system/ed*)...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
4c7b0ceb6b
commit
bec3f76f1d
@ -1126,7 +1126,9 @@ object.Constructor('Page', BasePage, {
|
|||||||
&& this.actions_inherit_args.has(pwpath.basename(src))
|
&& this.actions_inherit_args.has(pwpath.basename(src))
|
||||||
&& this.get(pwpath.dirname(src)).path == this.path){
|
&& this.get(pwpath.dirname(src)).path == this.path){
|
||||||
src += ':$ARGS' }
|
src += ':$ARGS' }
|
||||||
var expandactions = args.expandactions
|
var expandactions =
|
||||||
|
args.expandactions
|
||||||
|
?? true
|
||||||
|
|
||||||
var depends = state.depends =
|
var depends = state.depends =
|
||||||
state.depends
|
state.depends
|
||||||
@ -2020,17 +2022,25 @@ module.System = {
|
|||||||
<slot header>
|
<slot header>
|
||||||
<a href="#/list">☰</a>
|
<a href="#/list">☰</a>
|
||||||
<a href="#<slot parent>../</slot>">⇑</a>
|
<a href="#<slot parent>../</slot>">⇑</a>
|
||||||
|
<!-- XXX make this editable... -->
|
||||||
[<slot location>@source(./location/!)</slot>]
|
[<slot location>@source(./location/!)</slot>]
|
||||||
<a href="javascript:refresh()">⟳</a>
|
<a href="javascript:refresh()">⟳</a>
|
||||||
<a href="#@source(s ./path/!)/edit">✎</a>
|
<slot edit>
|
||||||
|
<a href="#@source(s ./path/!)/edit">✎</a>
|
||||||
|
</slot>
|
||||||
</slot>
|
</slot>
|
||||||
<hr>
|
<hr>
|
||||||
|
<slot content/>
|
||||||
|
<hr>
|
||||||
|
<slot footer/>
|
||||||
|
|
||||||
|
<!-- NOTE: this is not included directly to enable client code to
|
||||||
|
set slots that are defined after the content... -->
|
||||||
<slot content>
|
<slot content>
|
||||||
<h1><slot title>@source(./title/!)</slot></h1>
|
<h1><slot title>@source(./title/!)</slot></h1>
|
||||||
@include(.:$ARGS join="@source(file-separator)" recursive="")
|
@include(.:$ARGS join="@source(file-separator)" recursive="")
|
||||||
</slot>
|
</slot>
|
||||||
<hr>
|
` },
|
||||||
<slot footer/>` },
|
|
||||||
// XXX add join...
|
// XXX add join...
|
||||||
_raw: {
|
_raw: {
|
||||||
text: '@quote(.)' },
|
text: '@quote(.)' },
|
||||||
@ -2089,6 +2099,7 @@ module.System = {
|
|||||||
|
|
||||||
<slot parent>../..</slot>
|
<slot parent>../..</slot>
|
||||||
<slot location>@source(../location/!)</slot>
|
<slot location>@source(../location/!)</slot>
|
||||||
|
<slot edit/>
|
||||||
|
|
||||||
<slot content>
|
<slot content>
|
||||||
<macro src=".." join="@source(file-separator)">
|
<macro src=".." join="@source(file-separator)">
|
||||||
@ -2137,6 +2148,69 @@ module.System = {
|
|||||||
</macro>
|
</macro>
|
||||||
</slot>`},
|
</slot>`},
|
||||||
//*/
|
//*/
|
||||||
|
//
|
||||||
|
// XXX EXPERIMENTAL...
|
||||||
|
ed: {
|
||||||
|
text: object.doc` @source(../ed-visual) `},
|
||||||
|
'ed-visual': {
|
||||||
|
text: object.doc`
|
||||||
|
@load(./edit)
|
||||||
|
|
||||||
|
<slot content>
|
||||||
|
<macro src=".." join="@source(file-separator)">
|
||||||
|
<h1>
|
||||||
|
<span class="title-editor"
|
||||||
|
wikiwords="no"
|
||||||
|
contenteditable
|
||||||
|
oninput="saveContent(\'@source(s ./path)/title\', this.innerText)">
|
||||||
|
@source(./title)
|
||||||
|
</span>
|
||||||
|
</h1>
|
||||||
|
<div class="editor"
|
||||||
|
wikiwords="no"
|
||||||
|
contenteditable
|
||||||
|
class="native-editor"
|
||||||
|
oninput="saveLiveContent('@source(s ./path)/html', this.innerHTML)">
|
||||||
|
@quote(./html)
|
||||||
|
</div>
|
||||||
|
</macro>
|
||||||
|
</slot>
|
||||||
|
|
||||||
|
<slot footer>
|
||||||
|
<div style="text-align:right">
|
||||||
|
<b>visual</b>
|
||||||
|
| <a href="#../ed-text">text</a>
|
||||||
|
</div>
|
||||||
|
</slot> `},
|
||||||
|
'ed-text': {
|
||||||
|
text: object.doc`
|
||||||
|
@load(./edit)
|
||||||
|
|
||||||
|
<slot content>
|
||||||
|
<macro src=".." join="@source(file-separator)">
|
||||||
|
<h1>
|
||||||
|
<span class="title-editor"
|
||||||
|
wikiwords="no"
|
||||||
|
contenteditable
|
||||||
|
oninput="saveContent(\'@source(s ./path)/title\', this.innerText)">
|
||||||
|
@source(./title)
|
||||||
|
</span>
|
||||||
|
</h1>
|
||||||
|
<pre class="editor"
|
||||||
|
wikiwords="no"
|
||||||
|
contenteditable
|
||||||
|
class="native-editor"
|
||||||
|
oninput="saveLiveContent('@source(s ./path)', this.innerText)"
|
||||||
|
><quote filter="quote-tags" src="."/></pre>
|
||||||
|
</macro>
|
||||||
|
</slot>
|
||||||
|
|
||||||
|
<slot footer>
|
||||||
|
<div style="text-align:right">
|
||||||
|
<a href="#../ed-visual">visual</a>
|
||||||
|
| <b>text</b>
|
||||||
|
</div>
|
||||||
|
</slot> `},
|
||||||
|
|
||||||
// XXX debug...
|
// XXX debug...
|
||||||
_path: {text: '@source(./path/! join=" ")'},
|
_path: {text: '@source(./path/! join=" ")'},
|
||||||
|
|||||||
@ -18,6 +18,7 @@
|
|||||||
* - CLI -
|
* - CLI -
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
* XXX should @quote(..)'s expandactions be on by default???
|
||||||
* XXX FEATURE store: mirror (slave) -- a way to hold data in one store
|
* XXX FEATURE store: mirror (slave) -- a way to hold data in one store
|
||||||
* and to mirror everything (async) to a separate store...
|
* and to mirror everything (async) to a separate store...
|
||||||
* example:
|
* example:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user