Your search did not match any results.
Text Area

Text Area

Documentation

The TextArea is a widget that enables a user to enter and edit a multi-line text.

Apply
Reset
<template> <div> <div class="dx-fieldset"> <div class="dx-fieldset-header">Default Mode</div> <div class="dx-field"> <dx-check-box :value="false" text="Limit text length" @value-changed="onCheckboxValueChanged" /> </div> </div> <div class="left-content"> <dx-text-area :height="90" :max-length="maxLength" :value.sync="value" /> </div> <div class="full-width-content"> <div class="dx-fieldset"> <div class="dx-fieldset-header">Event Handling and API</div> <div class="dx-field"> <div class="dx-field-label">Synchronize text areas </div> <div class="dx-field-value"> <dx-select-box :items="valueChangeEvents" :value.sync="eventValue" value-expr="name" display-expr="title" /> </div> </div> </div> <dx-text-area :height="90" :value.sync="valueForEditableTextArea" :value-change-event="eventValue" /> <dx-text-area :height="90" :read-only="true" :value="valueForEditableTextArea" /> </div> </div> </template> <script> import { DxTextArea, DxCheckBox, DxSelectBox } from 'devextreme-vue'; import service from './data.js'; export default { components: { DxCheckBox, DxTextArea, DxSelectBox }, data() { return { eventValue: service.valueChangeEvents[0].name, maxLength: null, value: service.getContent(), valueForEditableTextArea: service.getContent(), valueChangeEvents: service.valueChangeEvents }; }, methods: { onCheckboxValueChanged(e) { if (e.value) { this.value = service.getContent().substring(0, 100); this.maxLength = 100; } else { this.value = service.getContent(); this.maxLength = null; } } } }; </script> <style> .full-width-content { width: 100%; margin-top: 30px; } .full-width-content > .dx-widget { margin-bottom: 20px; } .full-width-content .dx-field { max-width: 385px; } </style>
import Vue from 'vue'; import App from './App.vue'; new Vue({ el: '#app', components: { App }, template: '<App/>' });
<!DOCTYPE html> <html> <head> <title>DevExtreme Demo</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/19.2.3/css/dx.common.css" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/19.2.3/css/dx.light.css" /> <script src="https://unpkg.com/core-js@2.4.1/client/shim.min.js"></script> <script src="https://unpkg.com/systemjs@0.21.3/dist/system.js"></script> <script type="text/javascript" src="config.js"></script> <script type="text/javascript"> System.import('./index.js'); </script> </head> <body class="dx-viewport"> <div class="demo-container"> <div id="app"> <span v-if="false">Loading...</span> </div> </div> </body> </html>
const valueChangeEvents = [{ title: 'On Blur', name: 'change' }, { title: 'On Key Up', name: 'keyup' }]; let content = 'Prepare 2013 Marketing Plan: We need to double revenues in 2013 and our marketing strategy is going to be key here. R&D is improving existing products and creating new products so we can deliver great AV equipment to our customers.Robert, please make certain to create a PowerPoint presentation for the members of the executive team.'; export default { valueChangeEvents: valueChangeEvents, getContent() { return content; } };
System.config({ transpiler: 'plugin-babel', paths: { 'npm:': 'https://unpkg.com/' }, map: { vue: 'npm:vue@2.6.3/dist/vue.esm.browser.js', 'vue-loader': 'npm:dx-systemjs-vue-browser@latest/index.js', 'devextreme': 'npm:devextreme@19.2', 'devextreme-vue': 'npm:devextreme-vue@19.2', jszip: 'npm:jszip@3.1.3/dist/jszip.min.js', 'quill': 'npm:quill@1.3.7/dist/quill.js', 'devexpress-diagram': 'npm:devexpress-diagram', 'devexpress-gantt': 'npm:devexpress-gantt', 'plugin-babel': 'npm:systemjs-plugin-babel@0/plugin-babel.js', 'systemjs-babel-build': 'npm:systemjs-plugin-babel@0/systemjs-babel-browser.js' }, meta: { '*.vue': { loader: 'vue-loader' } }, packages: { 'devextreme-vue': { main: 'index.js' }, 'devextreme': { defaultExtension: 'js' } }, babelOptions: { sourceMaps: false, stage0: true } });