This commit is contained in:
@@ -224,6 +224,7 @@ RESEARCH
|
||||
todo: BUG Something fucked with history? When I click on a widget's history button in admin user history view it shows two created record with differing timestamps
|
||||
- note, it doesn't seem to do it on the most recent widgets, but only on the first few created for some reason?!
|
||||
|
||||
todo: QUOTE icon being used is fa-edit, but, that is much more useful in the UI for edit buttons on things, so change quote icon to something else
|
||||
|
||||
todo: ATTACHMENTS
|
||||
- ability to rename file on upload https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/3546
|
||||
|
||||
@@ -3,7 +3,16 @@
|
||||
<span class="v-label v-label--active theme--light">
|
||||
Wiki
|
||||
</span>
|
||||
<div>
|
||||
<v-btn x-large icon @click="wikiVisible = !wikiVisible">
|
||||
<v-icon>{{ visibleIcon() }}</v-icon>
|
||||
</v-btn>
|
||||
</div>
|
||||
<v-btn x-large icon v-if="canEdit" text @click="toggleEditMode()">
|
||||
<v-icon>fa-edit</v-icon></v-btn
|
||||
>
|
||||
<v-sheet
|
||||
v-if="wikiVisible && !designerVisible"
|
||||
elevation="2"
|
||||
v-html="compiledOutput()"
|
||||
class="aywiki pa-2 pa-sm-6 mt-2"
|
||||
@@ -15,11 +24,21 @@
|
||||
import marked from "marked";
|
||||
import DOMPurify from "dompurify";
|
||||
export default {
|
||||
data: () => ({}),
|
||||
data() {
|
||||
return {
|
||||
wikiVisible: false,
|
||||
designerVisible: false
|
||||
};
|
||||
},
|
||||
props: {
|
||||
value: String
|
||||
value: String,
|
||||
canEdit: Boolean
|
||||
},
|
||||
methods: {
|
||||
toggleEditMode() {},
|
||||
visibleIcon() {
|
||||
return this.wikiVisible ? "fa-eye-slash" : "fa-eye";
|
||||
},
|
||||
compiledOutput() {
|
||||
return DOMPurify.sanitize(marked(this.value));
|
||||
}
|
||||
@@ -29,13 +48,21 @@ export default {
|
||||
/**
|
||||
todo:
|
||||
|
||||
figure out why parts are fucked (blockquote)
|
||||
remove extra spacing on sides in xs mode (gutters maybe on column or row?)
|
||||
|
||||
Show/hide/edit control
|
||||
eyeball icon like password reveal
|
||||
|
||||
|
||||
if can't edit and no content then don't show at all
|
||||
- does it need to have a column wrapper then and remove it from the parent form?
|
||||
|
||||
|
||||
baseurl setting for local images:
|
||||
https://marked.js.org/#/USING_ADVANCED.md#options
|
||||
|
||||
|
||||
Clean up the example markdown, go through and use mine and sprinkle in the marked sample stuff where it differs
|
||||
|
||||
|
||||
*/
|
||||
</script>
|
||||
|
||||
@@ -205,7 +205,11 @@
|
||||
></gz-custom-fields>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<gz-wiki v-model="obj.wikiContent" :parentVM="this"></gz-wiki
|
||||
<gz-wiki
|
||||
v-model="obj.wikiContent"
|
||||
:canEdit="true"
|
||||
:parentVM="this"
|
||||
></gz-wiki
|
||||
></v-col>
|
||||
</v-row>
|
||||
</v-form>
|
||||
|
||||
Reference in New Issue
Block a user