mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-16 08:01:39 +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>",
|
||||
"license": "BSD",
|
||||
"dependencies": {
|
||||
"@toast-ui/editor": "^3.2.0",
|
||||
"glob": "*",
|
||||
"ig-actions": "*",
|
||||
"ig-features": "*",
|
||||
"ig-object": "*",
|
||||
"ig-types": "^6.9.4",
|
||||
"jszip": "*",
|
||||
"medium-editor": "^5.23.3",
|
||||
"medium-editor-markdown": "^3.2.2",
|
||||
"pouchdb": "^7.3.0",
|
||||
"pouchdb-browser": "^7.3.0",
|
||||
"requirejs": "*",
|
||||
|
||||
@ -58,6 +58,21 @@ pwiki.store.update('@pouch', {
|
||||
// XXX TEST...
|
||||
// XXX add filter tests...
|
||||
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({
|
||||
location: '/test/wikiword',
|
||||
text: object.doc`
|
||||
|
||||
21
pwiki2.html
21
pwiki2.html
@ -90,9 +90,7 @@ document.pwikiloaded = new Event('pwikiloaded')
|
||||
// start loading pWiki...
|
||||
require(['./browser'], function(pwiki){
|
||||
pwiki = window.pwiki = pwiki.pwiki
|
||||
|
||||
pwiki.dom = document.querySelector('#pWiki')
|
||||
|
||||
// handle location.hash/history (both directions)
|
||||
window.addEventListener('hashchange', function(evt){
|
||||
evt.preventDefault()
|
||||
@ -128,11 +126,28 @@ require(['./browser'], function(pwiki){
|
||||
&& this.dom
|
||||
.querySelector('#'+ this.hash)
|
||||
.scrollIntoView() })
|
||||
|
||||
// show current page...
|
||||
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>
|
||||
|
||||
<body>
|
||||
|
||||
18
pwiki2.js
18
pwiki2.js
@ -17,7 +17,8 @@
|
||||
* - render page -- DONE
|
||||
* - navigation -- DONE
|
||||
* - hash/anchor -- DONE
|
||||
* - editor and interactivity
|
||||
* - basic editor and interactivity
|
||||
* - export / zip
|
||||
* - migrate bootstrap
|
||||
* - store topology
|
||||
* - sync and sync conf
|
||||
@ -33,8 +34,21 @@
|
||||
* - tags (current)
|
||||
* - raw / code
|
||||
* - nl2br
|
||||
* - path2link (wikiword?)
|
||||
* - path2link (wikiword?) -- DONE
|
||||
* - 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
|
||||
* - defaults
|
||||
* - System/config (global)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user