@@ -236,6 +236,10 @@ export default defineComponent({
type: String,
default: undefined,
},
+ folder: {
+ type: String,
+ default: undefined,
+ },
},
emits: ['input'],
setup(props, { emit }) {
diff --git a/app/src/interfaces/input-rich-text-md/index.ts b/app/src/interfaces/input-rich-text-md/index.ts
index d7c7a60946..9480dfd4a2 100644
--- a/app/src/interfaces/input-rich-text-md/index.ts
+++ b/app/src/interfaces/input-rich-text-md/index.ts
@@ -11,227 +11,244 @@ export default defineInterface({
types: ['text'],
group: 'standard',
preview: PreviewSVG,
- options: [
- {
- field: 'placeholder',
- name: '$t:placeholder',
- type: 'string',
- meta: {
- width: 'full',
- interface: 'input-multiline',
- options: {
- placeholder: '$t:enter_a_placeholder',
- },
- },
- },
- {
- field: 'editorFont',
- name: '$t:interfaces.input-rich-text-md.editorFont',
- type: 'string',
- meta: {
- width: 'half',
- interface: 'select-dropdown',
- options: {
- choices: [
- { text: '$t:sans_serif', value: 'sans-serif' },
- { text: '$t:monospace', value: 'monospace' },
- { text: '$t:serif', value: 'serif' },
+ options: {
+ standard: [
+ {
+ field: 'toolbar',
+ name: '$t:interfaces.input-rich-text-html.toolbar',
+ type: 'json',
+ schema: {
+ default_value: [
+ 'heading',
+ 'bold',
+ 'italic',
+ 'strikethrough',
+ 'bullist',
+ 'numlist',
+ 'blockquote',
+ 'code',
+ 'link',
+ 'table',
+ 'image',
+ 'empty',
],
},
- },
- schema: {
- default_value: 'sans-serif',
- },
- },
- {
- field: 'previewFont',
- name: '$t:interfaces.input-rich-text-md.previewFont',
- type: 'string',
- meta: {
- width: 'half',
- interface: 'select-dropdown',
- options: {
- choices: [
- { text: '$t:sans_serif', value: 'sans-serif' },
- { text: '$t:monospace', value: 'monospace' },
- { text: '$t:serif', value: 'serif' },
- ],
+ meta: {
+ width: 'half',
+ interface: 'select-multiple-dropdown',
+ options: {
+ choices: [
+ {
+ value: 'heading',
+ text: '$t:wysiwyg_options.heading',
+ },
+ {
+ value: 'bold',
+ text: '$t:wysiwyg_options.bold',
+ },
+ {
+ value: 'italic',
+ text: '$t:wysiwyg_options.italic',
+ },
+ {
+ value: 'strikethrough',
+ text: '$t:wysiwyg_options.strikethrough',
+ },
+ {
+ value: 'blockquote',
+ text: '$t:wysiwyg_options.blockquote',
+ },
+ {
+ value: 'bullist',
+ text: '$t:wysiwyg_options.bullist',
+ },
+ {
+ value: 'numlist',
+ text: '$t:wysiwyg_options.numlist',
+ },
+ {
+ value: 'table',
+ text: '$t:wysiwyg_options.table',
+ },
+ {
+ value: 'code',
+ text: '$t:wysiwyg_options.source_code',
+ },
+ {
+ value: 'image',
+ text: '$t:wysiwyg_options.image',
+ },
+ {
+ value: 'link',
+ text: '$t:wysiwyg_options.link',
+ },
+ ],
+ },
},
},
- schema: {
- default_value: 'sans-serif',
- },
- },
- {
- field: 'toolbar',
- name: '$t:interfaces.input-rich-text-html.toolbar',
- type: 'json',
- schema: {
- default_value: [
- 'heading',
- 'bold',
- 'italic',
- 'strikethrough',
- 'bullist',
- 'numlist',
- 'blockquote',
- 'code',
- 'link',
- 'table',
- 'image',
- 'empty',
- ],
- },
- meta: {
- width: 'half',
- interface: 'select-multiple-dropdown',
- options: {
- choices: [
- {
- value: 'heading',
- text: '$t:wysiwyg_options.heading',
- },
- {
- value: 'bold',
- text: '$t:wysiwyg_options.bold',
- },
- {
- value: 'italic',
- text: '$t:wysiwyg_options.italic',
- },
- {
- value: 'strikethrough',
- text: '$t:wysiwyg_options.strikethrough',
- },
- {
- value: 'blockquote',
- text: '$t:wysiwyg_options.blockquote',
- },
- {
- value: 'bullist',
- text: '$t:wysiwyg_options.bullist',
- },
- {
- value: 'numlist',
- text: '$t:wysiwyg_options.numlist',
- },
- {
- value: 'table',
- text: '$t:wysiwyg_options.table',
- },
- {
- value: 'code',
- text: '$t:wysiwyg_options.source_code',
- },
- {
- value: 'image',
- text: '$t:wysiwyg_options.image',
- },
- {
- value: 'link',
- text: '$t:wysiwyg_options.link',
- },
- ],
+ {
+ field: 'placeholder',
+ name: '$t:placeholder',
+ type: 'string',
+ meta: {
+ width: 'half',
+ interface: 'input',
+ options: {
+ placeholder: '$t:enter_a_placeholder',
+ },
},
},
- },
- {
- field: 'customSyntax',
- name: '$t:interfaces.input-rich-text-md.customSyntax',
- type: 'json',
- meta: {
- note: '$t:interfaces.input-rich-text-md.customSyntax_label',
- width: 'full',
- interface: 'list',
- options: {
- addLabel: '$t:interfaces.input-rich-text-md.customSyntax_add',
- template: '{{ name }}',
- fields: [
- {
- field: 'name',
- type: 'string',
- name: '$t:name',
- meta: {
- interface: 'input',
- width: 'half',
- options: {
- placeholder: '$t:name',
- default: null,
- },
- },
- },
- {
- field: 'icon',
- type: 'string',
- name: '$t:icon',
- meta: {
- interface: 'select-icon',
- width: 'half',
- },
- },
- {
- field: 'prefix',
- type: 'string',
- name: '$t:prefix',
- meta: {
- interface: 'input',
- width: 'half',
- options: {
- placeholder: '$t:prefix',
- default: null,
- },
- },
- },
- {
- field: 'suffix',
- type: 'string',
- name: '$t:suffix',
- meta: {
- interface: 'input',
- width: 'half',
- options: {
- placeholder: '$t:suffix',
- default: null,
- },
- },
- },
- {
- field: 'box',
- type: 'string',
- name: '$t:interfaces.input-rich-text-md.box',
- meta: {
- interface: 'select-radio',
- width: 'half',
- options: {
- choices: [
- {
- text: '$t:inline',
- value: 'inline',
- },
- {
- text: '$t:block',
- value: 'block',
- },
- ],
- },
- },
- schema: {
- default_value: 'inline',
- },
- },
- ],
+ {
+ field: 'folder',
+ name: '$t:interfaces.system-folder.folder',
+ type: 'uuid',
+ meta: {
+ width: 'half',
+ interface: 'system-folder',
+ note: '$t:interfaces.system-folder.field_hint',
+ },
+ schema: {
+ default_value: undefined,
},
},
- },
- {
- field: 'imageToken',
- name: '$t:interfaces.input-rich-text-md.imageToken',
- type: 'string',
- meta: {
- note: '$t:interfaces.input-rich-text-md.imageToken_label',
- width: 'full',
- interface: 'input',
+ {
+ field: 'imageToken',
+ name: '$t:interfaces.input-rich-text-md.imageToken',
+ type: 'string',
+ meta: {
+ note: '$t:interfaces.input-rich-text-md.imageToken_label',
+ width: 'half',
+ interface: 'input',
+ },
},
- },
- ],
+ ],
+ advanced: [
+ {
+ field: 'editorFont',
+ name: '$t:interfaces.input-rich-text-md.editorFont',
+ type: 'string',
+ meta: {
+ width: 'half',
+ interface: 'select-dropdown',
+ options: {
+ choices: [
+ { text: '$t:sans_serif', value: 'sans-serif' },
+ { text: '$t:monospace', value: 'monospace' },
+ { text: '$t:serif', value: 'serif' },
+ ],
+ },
+ },
+ schema: {
+ default_value: 'sans-serif',
+ },
+ },
+ {
+ field: 'previewFont',
+ name: '$t:interfaces.input-rich-text-md.previewFont',
+ type: 'string',
+ meta: {
+ width: 'half',
+ interface: 'select-dropdown',
+ options: {
+ choices: [
+ { text: '$t:sans_serif', value: 'sans-serif' },
+ { text: '$t:monospace', value: 'monospace' },
+ { text: '$t:serif', value: 'serif' },
+ ],
+ },
+ },
+ schema: {
+ default_value: 'sans-serif',
+ },
+ },
+ {
+ field: 'customSyntax',
+ name: '$t:interfaces.input-rich-text-md.customSyntax',
+ type: 'json',
+ meta: {
+ note: '$t:interfaces.input-rich-text-md.customSyntax_label',
+ width: 'full',
+ interface: 'list',
+ options: {
+ addLabel: '$t:interfaces.input-rich-text-md.customSyntax_add',
+ template: '{{ name }}',
+ fields: [
+ {
+ field: 'name',
+ type: 'string',
+ name: '$t:name',
+ meta: {
+ interface: 'input',
+ width: 'half',
+ options: {
+ placeholder: '$t:name',
+ default: null,
+ },
+ },
+ },
+ {
+ field: 'icon',
+ type: 'string',
+ name: '$t:icon',
+ meta: {
+ interface: 'select-icon',
+ width: 'half',
+ },
+ },
+ {
+ field: 'prefix',
+ type: 'string',
+ name: '$t:prefix',
+ meta: {
+ interface: 'input',
+ width: 'half',
+ options: {
+ placeholder: '$t:prefix',
+ default: null,
+ },
+ },
+ },
+ {
+ field: 'suffix',
+ type: 'string',
+ name: '$t:suffix',
+ meta: {
+ interface: 'input',
+ width: 'half',
+ options: {
+ placeholder: '$t:suffix',
+ default: null,
+ },
+ },
+ },
+ {
+ field: 'box',
+ type: 'string',
+ name: '$t:interfaces.input-rich-text-md.box',
+ meta: {
+ interface: 'select-radio',
+ width: 'half',
+ options: {
+ choices: [
+ {
+ text: '$t:inline',
+ value: 'inline',
+ },
+ {
+ text: '$t:block',
+ value: 'block',
+ },
+ ],
+ },
+ },
+ schema: {
+ default_value: 'inline',
+ },
+ },
+ ],
+ },
+ },
+ },
+ ],
+ },
});
diff --git a/app/src/interfaces/input-rich-text-md/input-rich-text-md.vue b/app/src/interfaces/input-rich-text-md/input-rich-text-md.vue
index fb44080ad7..304c37bf0c 100644
--- a/app/src/interfaces/input-rich-text-md/input-rich-text-md.vue
+++ b/app/src/interfaces/input-rich-text-md/input-rich-text-md.vue
@@ -170,7 +170,7 @@
{{ t('upload_from_device') }}
-
+
{{ t('cancel') }}
@@ -243,6 +243,10 @@ export default defineComponent({
type: String,
default: undefined,
},
+ folder: {
+ type: String,
+ default: undefined,
+ },
},
emits: ['input'],
setup(props, { emit }) {
diff --git a/app/src/lang/translations/en-US.yaml b/app/src/lang/translations/en-US.yaml
index 16cbe0834d..6bfbae7618 100644
--- a/app/src/lang/translations/en-US.yaml
+++ b/app/src/lang/translations/en-US.yaml
@@ -1483,6 +1483,9 @@ interfaces:
toolbar: Toolbar
custom_formats: Custom Formats
options_override: Options Override
+ folder_note: Folder for uploaded files. Does not affect existing files.
+ imageToken: Image Token
+ imageToken_label: What (static) token to append to image sources
input-autocomplete-api:
input-autocomplete-api: Autocomplete Input (API)
description: A search typeahead for external API values.