Use woot-editor instead of native textarea (#6216)
This commit is contained in:
@@ -88,9 +88,9 @@
|
|||||||
v-model="action_params"
|
v-model="action_params"
|
||||||
:teams="dropdownValues"
|
:teams="dropdownValues"
|
||||||
/>
|
/>
|
||||||
<textarea
|
<woot-message-editor
|
||||||
v-if="inputType === 'textarea'"
|
v-if="inputType === 'textarea'"
|
||||||
v-model="action_params"
|
v-model="castMessageVmodel"
|
||||||
rows="4"
|
rows="4"
|
||||||
:placeholder="$t('AUTOMATION.ACTION.TEAM_MESSAGE_INPUT_PLACEHOLDER')"
|
:placeholder="$t('AUTOMATION.ACTION.TEAM_MESSAGE_INPUT_PLACEHOLDER')"
|
||||||
class="action-message"
|
class="action-message"
|
||||||
@@ -107,10 +107,12 @@
|
|||||||
<script>
|
<script>
|
||||||
import AutomationActionTeamMessageInput from './AutomationActionTeamMessageInput.vue';
|
import AutomationActionTeamMessageInput from './AutomationActionTeamMessageInput.vue';
|
||||||
import AutomationActionFileInput from './AutomationFileInput.vue';
|
import AutomationActionFileInput from './AutomationFileInput.vue';
|
||||||
|
import WootMessageEditor from 'dashboard/components/widgets/WootWriter/Editor';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
AutomationActionTeamMessageInput,
|
AutomationActionTeamMessageInput,
|
||||||
AutomationActionFileInput,
|
AutomationActionFileInput,
|
||||||
|
WootMessageEditor,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
@@ -173,6 +175,17 @@ export default {
|
|||||||
'is-a-macro': this.isMacro,
|
'is-a-macro': this.isMacro,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
castMessageVmodel: {
|
||||||
|
get() {
|
||||||
|
if (Array.isArray(this.action_params)) {
|
||||||
|
return this.action_params[0];
|
||||||
|
}
|
||||||
|
return this.action_params;
|
||||||
|
},
|
||||||
|
set(value) {
|
||||||
|
this.action_params = value;
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
removeAction() {
|
removeAction() {
|
||||||
@@ -281,4 +294,8 @@ export default {
|
|||||||
.action-message {
|
.action-message {
|
||||||
margin: var(--space-small) var(--space-zero) var(--space-zero);
|
margin: var(--space-small) var(--space-zero) var(--space-zero);
|
||||||
}
|
}
|
||||||
|
// Prosemirror does not have a native way of hiding the menu bar, hence
|
||||||
|
::v-deep .ProseMirror-menubar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user