Skip to content

02 Text - v_textarea...

v_textarea

v_textarea is a component with

  • file upload support
  • markdown support
  • value
  • readonly
  • tab - -4 default edit ,-3 preview
  • advanced - default true
  • required
  • valuetype - default md
  • css - default xd-white
  • placeholder default comment
HTML
<v_textarea  v-model="value" style="border:0" :readonly="true" v-model="api.description"></v_textarea>

v_editable_div

Simple editable div

Props:

  • slot

Events:

  • @input
  • @updated
HTML
<v_editable_div :content="" @update=""></v_editable_div>

codemirror

Source code editor with syntax highlighting

JavaScript
var selected= this.codemirror.getSelection();  // get selection
this.codemirror.replaceSelection( ); // replace selection
JavaScript
data: function () {
        return {
            cmOption: {
                name: "gfm",
                connect: 'align',
                mode:"text/x-markdown",
              //  theme: 'base16-dark',
                theme: "default",
                lineNumbers: true,
                collapseIdentical: false
            },
            }}
HTML
<codemirror v-model="content" :options="cmOption" </codemirror>

v_code

Display code with syntax highlighting.

Props

  • value: { type: String }
  • type: { type: String, default: 'txt' } (Supported types: js, javascript, json, txt, html, css, xml, sql, handlebars)
  • highlight: { type: Boolean, default: false }

Example

HTML
<v_code value="select * from test" :highlight="true" type="sql"></v_code>