diff --git a/application/Espo/Resources/i18n/en_US/Admin.json b/application/Espo/Resources/i18n/en_US/Admin.json index bd0630fff8..aa5217177e 100644 --- a/application/Espo/Resources/i18n/en_US/Admin.json +++ b/application/Espo/Resources/i18n/en_US/Admin.json @@ -93,7 +93,8 @@ "attachmentMultiple": "Attachment Multiple", "rangeInt": "Range Integer", "rangeFloat": "Range Float", - "rangeCurrency": "Range Currency" + "rangeCurrency": "Range Currency", + "wysiwyg": "Wysiwyg" }, "fields": { "type": "Type", @@ -117,7 +118,8 @@ "entityList": "Entity List", "isSorted": "Is Sorted (alphabetically)", "audited": "Audited", - "trim": "Trim" + "trim": "Trim", + "height": "Height (px)" }, "messages": { "upgradeVersion": "Your EspoCRM will be upgraded to version {version}. This can take some time.", diff --git a/application/Espo/Resources/metadata/entityDefs/Email.json b/application/Espo/Resources/metadata/entityDefs/Email.json index 081678a8e2..ed6412ff9c 100644 --- a/application/Espo/Resources/metadata/entityDefs/Email.json +++ b/application/Espo/Resources/metadata/entityDefs/Email.json @@ -111,9 +111,9 @@ "seeMoreDisabled": true }, "body": { - "type": "text", - "view": "Fields.Wysiwyg", - "seeMoreDisabled": true + "type": "wysiwyg", + "seeMoreDisabled": true, + "height": 150 }, "isHtml": { "type": "bool", diff --git a/application/Espo/Resources/metadata/fields/wysiwyg.json b/application/Espo/Resources/metadata/fields/wysiwyg.json new file mode 100644 index 0000000000..fab0655c9e --- /dev/null +++ b/application/Espo/Resources/metadata/fields/wysiwyg.json @@ -0,0 +1,29 @@ +{ + "params":[ + { + "name": "required", + "type": "bool", + "default": false + }, + { + "name": "default", + "type": "text" + }, + { + "name": "maxLength", + "type": "int" + }, + { + "name": "seeMoreDisabled", + "type": "bool" + }, + { + "name": "height", + "type": "int" + } + ], + "filter": true, + "fieldDefs":{ + "type":"text" + } +} diff --git a/frontend/client/src/views/fields/text.js b/frontend/client/src/views/fields/text.js index b2a1004b8a..aed2244aca 100644 --- a/frontend/client/src/views/fields/text.js +++ b/frontend/client/src/views/fields/text.js @@ -47,6 +47,7 @@ Espo.define('Views.Fields.Text', 'Views.Fields.Base', function (Dep) { }, setup: function () { + Dep.prototype.setup.call(this); this.params.rows = this.params.rows || this.rowsDefault; }, diff --git a/frontend/client/src/views/fields/wysiwyg.js b/frontend/client/src/views/fields/wysiwyg.js index 5371f45aea..eb40a3ba80 100644 --- a/frontend/client/src/views/fields/wysiwyg.js +++ b/frontend/client/src/views/fields/wysiwyg.js @@ -23,18 +23,19 @@ Espo.define('views/fields/wysiwyg', ['views/fields/text', 'lib!Summernote'], fun return Dep.extend({ + type: 'wysiwyg', + detailTemplate: 'fields.wysiwyg.detail', editTemplate: 'fields.wysiwyg.edit', - height: 150, + height: 250, rowsDefault: 10, setup: function () { Dep.prototype.setup.call(this); - this.height = this.params.height || this.height; this.toolbar = this.params.toolbar || [ ['style', ['style']],