Some fixes, added Events in edit
This commit is contained in:
25
src/content/MiriamsWunderkisteContent.vue
Normal file
25
src/content/MiriamsWunderkisteContent.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<div class="some-page">
|
||||
<ContentComponent :link="currentLink" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ContentComponent from '@/components/ContentComponent.vue';
|
||||
|
||||
export default {
|
||||
name: 'SomePage',
|
||||
components: {
|
||||
ContentComponent,
|
||||
},
|
||||
computed: {
|
||||
currentLink() {
|
||||
return this.$route.path;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
</div>
|
||||
<div class="additional-toolbar">
|
||||
<button @click="openAddEventsDialog">Events</button>
|
||||
<button>Kontaktpersonen</button>
|
||||
<button @click="openAddContactDialog">Kontaktpersonen</button>
|
||||
<button>Institutionen</button>
|
||||
<button @click="openWorshipDialog">Gottesdienste</button>
|
||||
</div>
|
||||
@@ -90,6 +90,7 @@
|
||||
<AddEventDialog ref="addEventDialog" @confirm="insertEvent" />
|
||||
<AddLinkDialog ref="addLinkDialog" @confirm="insertLink" />
|
||||
<AddDownloadDialog ref="addDownloadDialog" @confirm="insertDownload" />
|
||||
<AddContactDialog ref="addContactDialog" @confirm="insertContact" />
|
||||
<input type="color" ref="colorPicker" @input="setColor" style="display: none;" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -118,6 +119,7 @@ import AddImageDialog from '@/components/AddImageDialog.vue';
|
||||
import AddEventDialog from '@/components/AddEventDialog.vue';
|
||||
import AddLinkDialog from '@/components/AddLinkDialog.vue';
|
||||
import AddDownloadDialog from '@/components/AddDownloadDialog.vue';
|
||||
import AddContactDialog from '@/components/AddContactDialog.vue';
|
||||
|
||||
import { BoldIcon, ItalicIcon, UnderlineIcon, StrikethroughIcon, ListIcon, NumberedListLeftIcon, TableIcon,
|
||||
Table2ColumnsIcon, ArrowDownIcon, ArrowRightIcon, TableRowsIcon, AlignTopBoxIcon, AlignLeftBoxIcon, StatsReportIcon,
|
||||
@@ -147,6 +149,7 @@ export default {
|
||||
AddEventDialog,
|
||||
AddLinkDialog,
|
||||
AddDownloadDialog,
|
||||
AddContactDialog,
|
||||
OpenInWindowIcon,
|
||||
DownloadIcon,
|
||||
},
|
||||
@@ -160,6 +163,7 @@ export default {
|
||||
const addEventDialog = ref(null);
|
||||
const addLinkDialog = ref(null);
|
||||
const addDownloadDialog = ref(null);
|
||||
const addContactDialog = ref(null);
|
||||
const colorPicker = ref(null);
|
||||
|
||||
const editor = useEditor({
|
||||
@@ -318,6 +322,16 @@ export default {
|
||||
}
|
||||
};
|
||||
|
||||
const openAddContactDialog = () => {
|
||||
addContactDialog.value.openAddContactDialog();
|
||||
};
|
||||
|
||||
const insertContact = (configString) => {
|
||||
if (editor.value) {
|
||||
editor.value.chain().focus().insertContent(configString).run();
|
||||
}
|
||||
};
|
||||
|
||||
const openColorPicker = () => {
|
||||
colorPicker.value.click();
|
||||
};
|
||||
@@ -361,6 +375,38 @@ export default {
|
||||
editor.value.chain().focus().toggleOrderedList().run();
|
||||
};
|
||||
|
||||
const addColumnBefore = () => {
|
||||
editor.value.chain().focus().addColumnBefore().run();
|
||||
};
|
||||
|
||||
const addColumnAfter = () => {
|
||||
editor.value.chain().focus().addColumnAfter().run();
|
||||
};
|
||||
|
||||
const addRowBefore = () => {
|
||||
editor.value.chain().focus().addRowBefore().run();
|
||||
};
|
||||
|
||||
const addRowAfter = () => {
|
||||
editor.value.chain().focus().addRowAfter().run();
|
||||
};
|
||||
|
||||
const deleteColumn = () => {
|
||||
editor.value.chain().focus().deleteColumn().run();
|
||||
};
|
||||
|
||||
const deleteRow = () => {
|
||||
editor.value.chain().focus().deleteRow().run();
|
||||
};
|
||||
|
||||
const toggleHeaderColumn = () => {
|
||||
editor.value.chain().focus().toggleHeaderColumn().run();
|
||||
};
|
||||
|
||||
const toggleHeaderRow = () => {
|
||||
editor.value.chain().focus().toggleHeaderRow().run();
|
||||
};
|
||||
|
||||
return {
|
||||
pages,
|
||||
sortedPages,
|
||||
@@ -384,6 +430,9 @@ export default {
|
||||
addDownloadDialog,
|
||||
openAddDownloadDialog,
|
||||
insertDownload,
|
||||
addContactDialog,
|
||||
openAddContactDialog,
|
||||
insertContact,
|
||||
colorPicker,
|
||||
openColorPicker,
|
||||
setColor,
|
||||
@@ -395,6 +444,14 @@ export default {
|
||||
insertTable,
|
||||
toggleBulletList,
|
||||
toggleOrderedList,
|
||||
addColumnBefore,
|
||||
addColumnAfter,
|
||||
addRowBefore,
|
||||
addRowAfter,
|
||||
deleteColumn,
|
||||
deleteRow,
|
||||
toggleHeaderColumn,
|
||||
toggleHeaderRow,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user