Skip to content

Commit fbd58d1

Browse files
Support for Rich Text Input
1 parent 1a917cf commit fbd58d1

File tree

5 files changed

+13
-3
lines changed

5 files changed

+13
-3
lines changed

api/app/Http/Requests/AnswerFormRequest.php

+1
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ private function getPropertyRules($property): array
167167
{
168168
switch ($property['type']) {
169169
case 'text':
170+
case 'rich_text':
170171
case 'signature':
171172
return ['string'];
172173
case 'number':

client/components/open/forms/OpenFormField.vue

+1
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ export default {
210210
}
211211
return {
212212
text: 'TextInput',
213+
rich_text: 'RichTextAreaInput',
213214
number: 'TextInput',
214215
rating: 'RatingInput',
215216
scale: 'ScaleInput',

client/components/open/tables/OpenTable.vue

+1
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ export default {
193193
rafId: null,
194194
fieldComponents: {
195195
text: shallowRef(OpenText),
196+
rich_text: shallowRef(OpenText),
196197
number: shallowRef(OpenText),
197198
rating: shallowRef(OpenText),
198199
scale: shallowRef(OpenText),

client/components/open/tables/components/OpenText.vue

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<template>
2-
<span>
3-
{{ value }}
4-
</span>
2+
<div v-html="value" />
53
</template>
64

75
<script>

client/data/blocks_types.json

+9
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@
88
"text_class": "text-blue-900",
99
"is_input": true
1010
},
11+
"rich_text": {
12+
"name": "rich_text",
13+
"title": "Rich Text Input",
14+
"icon": "i-heroicons-bars-3-20-solid",
15+
"default_block_name": "Description",
16+
"bg_class": "bg-blue-100",
17+
"text_class": "text-blue-900",
18+
"is_input": true
19+
},
1120
"date": {
1221
"name": "date",
1322
"title": "Date Input",

0 commit comments

Comments
 (0)