mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-17 00:21:40 +00:00
experimenting...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
e7c34dd9f1
commit
c7daa906db
@ -4,12 +4,15 @@
|
|||||||
"author": "Alex A. Naanou <alex.nanou@gmail.com>",
|
"author": "Alex A. Naanou <alex.nanou@gmail.com>",
|
||||||
"license": "BSD",
|
"license": "BSD",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@toast-ui/editor": "^3.2.0",
|
||||||
"glob": "*",
|
"glob": "*",
|
||||||
"ig-actions": "*",
|
"ig-actions": "*",
|
||||||
"ig-features": "*",
|
"ig-features": "*",
|
||||||
"ig-object": "*",
|
"ig-object": "*",
|
||||||
"ig-types": "^6.9.4",
|
"ig-types": "^6.9.4",
|
||||||
"jszip": "*",
|
"jszip": "*",
|
||||||
|
"medium-editor": "^5.23.3",
|
||||||
|
"medium-editor-markdown": "^3.2.2",
|
||||||
"pouchdb": "^7.3.0",
|
"pouchdb": "^7.3.0",
|
||||||
"pouchdb-browser": "^7.3.0",
|
"pouchdb-browser": "^7.3.0",
|
||||||
"requirejs": "*",
|
"requirejs": "*",
|
||||||
|
|||||||
@ -58,6 +58,21 @@ pwiki.store.update('@pouch', {
|
|||||||
// XXX TEST...
|
// XXX TEST...
|
||||||
// XXX add filter tests...
|
// XXX add filter tests...
|
||||||
pwiki.pwiki
|
pwiki.pwiki
|
||||||
|
.update({
|
||||||
|
location: '/test/quote',
|
||||||
|
text: object.doc`
|
||||||
|
Inline quoted text:
|
||||||
|
---
|
||||||
|
<quote>
|
||||||
|
this should not get expanded: @now()
|
||||||
|
</quote>
|
||||||
|
---
|
||||||
|
|
||||||
|
Included quoted text:
|
||||||
|
---
|
||||||
|
<quote src="/test/slots"/>
|
||||||
|
`,
|
||||||
|
})
|
||||||
.update({
|
.update({
|
||||||
location: '/test/wikiword',
|
location: '/test/wikiword',
|
||||||
text: object.doc`
|
text: object.doc`
|
||||||
|
|||||||
21
pwiki2.html
21
pwiki2.html
@ -90,9 +90,7 @@ document.pwikiloaded = new Event('pwikiloaded')
|
|||||||
// start loading pWiki...
|
// start loading pWiki...
|
||||||
require(['./browser'], function(pwiki){
|
require(['./browser'], function(pwiki){
|
||||||
pwiki = window.pwiki = pwiki.pwiki
|
pwiki = window.pwiki = pwiki.pwiki
|
||||||
|
|
||||||
pwiki.dom = document.querySelector('#pWiki')
|
pwiki.dom = document.querySelector('#pWiki')
|
||||||
|
|
||||||
// handle location.hash/history (both directions)
|
// handle location.hash/history (both directions)
|
||||||
window.addEventListener('hashchange', function(evt){
|
window.addEventListener('hashchange', function(evt){
|
||||||
evt.preventDefault()
|
evt.preventDefault()
|
||||||
@ -128,11 +126,28 @@ require(['./browser'], function(pwiki){
|
|||||||
&& this.dom
|
&& this.dom
|
||||||
.querySelector('#'+ this.hash)
|
.querySelector('#'+ this.hash)
|
||||||
.scrollIntoView() })
|
.scrollIntoView() })
|
||||||
|
|
||||||
// show current page...
|
// show current page...
|
||||||
pwiki.path = location.hash.slice(1)
|
pwiki.path = location.hash.slice(1)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
// XXX
|
||||||
|
var saveData = async function(){
|
||||||
|
var blob = new Blob([await pwiki.store.json(true)], {type: "text/plain;charset=utf-8"});
|
||||||
|
|
||||||
|
var a = document.createElement('a')
|
||||||
|
var blobURL = a.href = URL.createObjectURL(blob)
|
||||||
|
a.download = 'pWiki-dump.json'
|
||||||
|
|
||||||
|
//document.body.appendChild(a)
|
||||||
|
a.dispatchEvent(new MouseEvent("click"))
|
||||||
|
//document.body.removeChild(a)
|
||||||
|
//URL.revokeObjectURL(blobURL)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
18
pwiki2.js
18
pwiki2.js
@ -17,7 +17,8 @@
|
|||||||
* - render page -- DONE
|
* - render page -- DONE
|
||||||
* - navigation -- DONE
|
* - navigation -- DONE
|
||||||
* - hash/anchor -- DONE
|
* - hash/anchor -- DONE
|
||||||
* - editor and interactivity
|
* - basic editor and interactivity
|
||||||
|
* - export / zip
|
||||||
* - migrate bootstrap
|
* - migrate bootstrap
|
||||||
* - store topology
|
* - store topology
|
||||||
* - sync and sync conf
|
* - sync and sync conf
|
||||||
@ -33,8 +34,21 @@
|
|||||||
* - tags (current)
|
* - tags (current)
|
||||||
* - raw / code
|
* - raw / code
|
||||||
* - nl2br
|
* - nl2br
|
||||||
* - path2link (wikiword?)
|
* - path2link (wikiword?) -- DONE
|
||||||
* - editor
|
* - editor
|
||||||
|
* MediumEditor (markdown-plugin)
|
||||||
|
* https://github.com/yabwe/medium-editor
|
||||||
|
* https://github.com/IonicaBizau/medium-editor-markdown
|
||||||
|
* - heavy-ish markdown plugin
|
||||||
|
* ToastUI (markdown)
|
||||||
|
* https://github.com/nhn/tui.editor
|
||||||
|
* - quite heavy
|
||||||
|
* Pen (markdown)
|
||||||
|
* https://github.com/sofish/pen
|
||||||
|
* - no npm module
|
||||||
|
* - not sure if it works on mobile
|
||||||
|
* + small
|
||||||
|
* tiptap (no-markdown, investigate y.js)
|
||||||
* - configuration
|
* - configuration
|
||||||
* - defaults
|
* - defaults
|
||||||
* - System/config (global)
|
* - System/config (global)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user