Use new editor, hide [[,]] from sidebar
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
30b24903f1
commit
bbc2ebc30f
6
editor/package-lock.json
generated
6
editor/package-lock.json
generated
|
@ -9267,9 +9267,9 @@
|
|||
}
|
||||
},
|
||||
"wiki-list-editor": {
|
||||
"version": "0.8.12",
|
||||
"resolved": "https://registry.npmjs.org/wiki-list-editor/-/wiki-list-editor-0.8.12.tgz",
|
||||
"integrity": "sha512-1YdtzQv38WdbtyGFV9DAO5bJi7ndcyQlFXG64aJRimbguu6x1YRP8dzGiStGKfoVqZpR5zZ8Q+7HrqsxKVb24g==",
|
||||
"version": "0.8.13",
|
||||
"resolved": "https://registry.npmjs.org/wiki-list-editor/-/wiki-list-editor-0.8.13.tgz",
|
||||
"integrity": "sha512-UMKzZ91WA4O2w6kL0lxS5KIfOMWIXW3AK63BVMP4vyFn2X4uvBEGJSknGVEoSxyXDhYoWTYzejb8B9RNefkNPA==",
|
||||
"requires": {
|
||||
"dragula": "^3.7.2",
|
||||
"he": "^1.2.0",
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
"vis-data": "^6.6.1",
|
||||
"vis-network": "^7.6.10",
|
||||
"vis-util": "^4.3.2",
|
||||
"wiki-list-editor": "^0.8.12"
|
||||
"wiki-list-editor": "^0.8.13"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node_modules/.bin/mocha -r esm",
|
||||
|
|
|
@ -210,8 +210,14 @@ MD.use(MarkdownItWikilinks({
|
|||
},
|
||||
})).use(MarkdownItMark).use(MarkdownItKatex)
|
||||
|
||||
let holder = document.getElementById('editor');
|
||||
if (holder) {
|
||||
let holders = document.getElementsByClassName('wiki-list-editor');
|
||||
|
||||
_.forEach(holders, (item, i) => {
|
||||
console.log(i, item)
|
||||
let EDITOR = new Editor(item)
|
||||
})
|
||||
|
||||
function Editor(holder) {
|
||||
const options = {
|
||||
transform(text, element) {
|
||||
let converted = text
|
||||
|
@ -255,7 +261,7 @@ if (holder) {
|
|||
})
|
||||
|
||||
editor.on('change', function () {
|
||||
let element = document.getElementById('editor');
|
||||
let element = holder
|
||||
let indicator = Indicator(document.getElementById('save-indicator'), 2);
|
||||
let saveUrl = element.dataset.saveurl;
|
||||
let page = element.dataset.page;
|
||||
|
@ -463,6 +469,8 @@ if (holder) {
|
|||
})
|
||||
|
||||
menu.connectContextMenu(editor)
|
||||
|
||||
return editor
|
||||
}
|
||||
|
||||
let timeout = null;
|
||||
|
|
|
@ -215,6 +215,14 @@ mark {
|
|||
.sidebar {
|
||||
padding: 0 12px;
|
||||
width: 100%;
|
||||
|
||||
|
||||
.wiki-link {
|
||||
&::before, &::after {
|
||||
content: '';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
<div class="column">
|
||||
{{ if .ShowGraph }}
|
||||
<div class="graph-network" data-name="{{ .Name }}" style="height:80vh; top:0; position: sticky"></div>
|
||||
<div class="graph-network" data-name="{{ .Name }}" style="height:80vh; top:0; position: sticky"></div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1 +1 @@
|
|||
<div id="editor" data-url="{{ .BaseURL }}{{ .Page }}?format=json" data-input="{{ .Data }}" data-saveurl="/save/" data-base-url="{{ .BaseURL }}" data-page="{{ .Page }}" save-type="{{ .ContentType }}"></div>
|
||||
<div class="wiki-list-editor" data-url="{{ .BaseURL }}{{ .Page }}?format=json" data-input="{{ .Data }}" data-saveurl="/save/" data-base-url="{{ .BaseURL }}" data-page="{{ .Page }}" save-type="{{ .ContentType }}"></div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user