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

Kendo Editro custom tool

3 Answers 103 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
JangHyen
Top achievements
Rank 1
JangHyen asked on 02 Dec 2019, 12:18 AM

Hi !

I'm using the kendo editor in the Vue environment.

I want to create a Kendo editor Custom tool using the following template.

I would like to create a Kendo editor custom tool for file upload using the template below. The internal logic is in place and we just want to see an example of creating a custom tool with a template.

--

 <input class="hide_file" type="file" @change="doUploadInput($event.target)"
            @drop="doUploadInput($event.target)" multiple>
          </input>

--

This is well enough in the official documentation but I would like to see a more detailed example.

thank you. have a good day

: )

3 Answers, 1 is accepted

Sort by
0
Petar
Telerik team
answered on 03 Dec 2019, 01:33 PM

Hi JangHyen,

Check this StackBlitz example. It demonstrates how we can create an upload Editor tool out of a template.

The tool is defined as:

        <kendo-editor-tool :name="'customUpload'"
                           :tooltip="'Insert a horizontal rule'"
                           :template="customUpload">
        </kendo-editor-tool>

The template is defined as:

    <script type="text/x-kendo-template" id="upload-template">
          <input class="hide_file" type="file" @change="doUploadInput($event.target)"
            @drop="doUploadInput($event.target)" multiple>
          </input>
    </script>

and the definition of the customUpload method that returns the HTML of the above Kendo template is:

        customUpload () {
            return kendo.jQuery('#upload-template').html()
        }

Let me know if you have any questions regarding the proposed solution.

Regards,
Petar
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
JangHyen
Top achievements
Rank 1
answered on 04 Dec 2019, 04:15 AM
This seems to work. thank you sir.
0
Petar
Telerik team
answered on 05 Dec 2019, 08:51 AM

Hi JangHyen,

You are welcome. Let me know if have other questions related to this thread. 

Regards,
Petar
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
Tags
General Discussions
Asked by
JangHyen
Top achievements
Rank 1
Answers by
Petar
Telerik team
JangHyen
Top achievements
Rank 1
Share this question
or