Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2022-08-08 12:29:02 +03:00
parent b046d0d5f4
commit d8814fd182
6 changed files with 48 additions and 6 deletions

View File

@ -10,7 +10,7 @@
/*********************************************************************/ //---------------------------------------------------------------------

17
pwiki/dom/wikiword.js Executable file
View File

@ -0,0 +1,17 @@
/**********************************************************************
*
*
*
**********************************************************************/
((typeof define)[0]=='u'?function(f){module.exports=f(require)}:define)
(function(require){ var module={} // make module AMD/node compatible...
/*********************************************************************/
/**********************************************************************
* vim:set ts=4 sw=4 : */ return module })

View File

@ -21,6 +21,7 @@ function(...args){
//--------------------------------------------------------------------- //---------------------------------------------------------------------
// XXX this does not seem to handle html well...
var WIKIWORD_PATTERN = var WIKIWORD_PATTERN =
RegExp('('+[ RegExp('('+[

View File

@ -816,6 +816,8 @@ object.Constructor('Page', BasePage, {
// explicit shown/hidden arguments are given. // explicit shown/hidden arguments are given.
// NOTE: hidden has precedence over shown if both are given. // NOTE: hidden has precedence over shown if both are given.
// //
// XXX revise the use of hidden/shown use mechanic and if it's
// needed...
// XXX how do we handle a slot defined within a slot???? // XXX how do we handle a slot defined within a slot????
// ...seems that we'll fall into recursion on definition... // ...seems that we'll fall into recursion on definition...
slot: Macro( slot: Macro(
@ -1095,6 +1097,13 @@ module.DOMPage =
object.Constructor('DOMPage', Page, { object.Constructor('DOMPage', Page, {
dom: undefined, dom: undefined,
plugins: {
// XXX
wikiword: undefined,
},
// events...
//
// XXX might be a good idea to move this up to Page and trigger when // XXX might be a good idea to move this up to Page and trigger when
// done updating... // done updating...
onLoad: types.event.Event('onLoad'), onLoad: types.event.Event('onLoad'),

View File

@ -13,6 +13,7 @@
* XXX add action to reset overloaded (bootstrap) pages... * XXX add action to reset overloaded (bootstrap) pages...
* - per page * - per page
* - global * - global
* XXX Q: can we access fs from a pwa???
* *
* *
* *
@ -22,16 +23,30 @@
* - test localStorage / sessionStorage -- DONE * - test localStorage / sessionStorage -- DONE
* - test pouch -- DONE * - test pouch -- DONE
* - render page -- DONE * - render page -- DONE
* - navigation * - navigation -- DONE
* - hash/anchor -- DONE * - hash/anchor -- DONE
* - service worker
* ...handle relative urls (???)
* - editor and interactivity * - editor and interactivity
* - migrate bootstrap * - migrate bootstrap
* - store topology * - store topology
* - WikiWord -- DONE
* - markdown -- DONE?? * - markdown -- DONE??
* - WikiWord --
* currently this is broken as it does not know how to deal with HTML
* this can be solved by one of:
* - make this a dom filter and only handle text nodes (as v1-2)
* - add a way to go around tags (as pwiki/parser)
* the first approach looks more promising...
* - dom filters ???
* does this need to be a pWiki level thing or just a js call/load??
* ...this can be used to contain all to page-side stuff like:
* - hash handling / navigation
* - editors
* - wikiwords
* - configuration
* - defaults
* - System/config (global)
* - pwa * - pwa
* - service worker ???
* ...handle relative urls (???)
* - cli * - cli
* - basic wiki manipulations (1:1 methods) * - basic wiki manipulations (1:1 methods)
* - import/export/sync * - import/export/sync
@ -39,7 +54,7 @@
* - archive old code * - archive old code
* - update docs * - update docs
* - refactor and cleanup * - refactor and cleanup
* - module structure -- DONE * - module structure -- REVISE
* - pack as electron app (???) * - pack as electron app (???)
* *
* *