This is a migrated thread and some comments may be shown as answers.

Retrieving the value of Kendo Editor

3 Answers 1243 Views
This is a migrated thread and some comments may be shown as answers.
louis
Top achievements
Rank 1
louis asked on 26 Jun 2018, 06:11 AM

Hi everyone,

I have an issue using the KendoEditor with Vue.js. Here is my code :

HTML part :    

<div id="vueapp" class="vue-app">

<form id="forme">
              <input type='text' class="k-textbox" name='title' id="title" v-model="request.title" />
 </form>
   <kendo-editor :resizable-content="true"
                 :resizable-toolbar="true"
                 :value="request.desc"
                 style="height:280px"
                 rows="10"
                 cols="30">
    </kendo-editor>
</div>

 

Script part for vue:

var vm = new Vue({
        el: '#vueapp',
        data: function() {
            return {
                request: {
                    title: "",
                    desc: "Write here..."
                    
                },
              has_deadline: false
            }
        }, methods: {

     test: function(){ alert(this.request.title + this.request.desc)}

}

});

Then, when I change the content of the input "title" (let's say I do "title1") and call the "test" method, an alert comes up with "title1 Write here...".

But when I change the content of the editor (for example, "description1"), the alert comes up with "title1 Write here..." instead of "title1 description1" !

Could someone explain me what I did wrong ? I can not find how to figure out.

 

Thanks for your help,

 

Louis

 

3 Answers, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 27 Jun 2018, 02:56 PM
Hi Louis,

You can get the Editor's value by getting a reference to the widget through the ref attribute and calling its value method, for example:
<kendo-editor ref="editor1"

test: function(){
  var editor = this.$refs.editor1.kendoWidget();
  alert(editor.value())
}


Regards,
Ivan Danchev
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Daniel
Top achievements
Rank 1
answered on 01 Dec 2020, 04:51 AM

Hi Ivan,

A couple of years after your reply (thanks), is there any other way to get the value of the Vue Editor? Otherwise, any plans to make it native?

Cheers

0
Ivan Danchev
Telerik team
answered on 02 Dec 2020, 03:06 PM

Hi Daniel,

The posted way of getting the value is the only one available at the moment.

As for a native Vue Editor, we do plan on adding more components to the list of native components, but the Editor specifically hasn't been planned for the R1 2021 release, so at this point we cannot share a time frame on when a native Editor will be included in the suite.

Regards,
Ivan Danchev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Asked by
louis
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Daniel
Top achievements
Rank 1
Share this question
or