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

change text "insert html" in editor

7 Answers 378 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Sébastien
Top achievements
Rank 1
Sébastien asked on 06 Aug 2012, 01:07 PM
Hi,

Is it possible to change the text "Insert HTML" in the editor when using snippets?

http://demos.kendoui.com/web/editor/snippets.html

Greets

S├ębastien

7 Answers, 1 is accepted

Sort by
0
Accepted
Courouble Damien
Top achievements
Rank 1
answered on 19 Sep 2012, 07:11 AM
Hey Seb,

I managed to it after one hour of debugging !

$("#myTextarea").kendoEditor({
    messages : {
            insertHtml : "My Custom translations"
    }
});

Damien
0
Kevn
Top achievements
Rank 1
answered on 25 Sep 2012, 01:32 PM
Can you clarify your solution and post an full example?  ow would I add your "Insert HTML"  text change to my sample code below.? 

Is there a link to where this exists in the documentation?
    $(document).ready(function () {
        $("#editor").kendoEditor({
            tools: [
                "bold",
                "italic",
                "underline",
                "strikethrough",
                "fontName",
                "fontSize",
                "foreColor",
                "backColor",
                "insertHtml",
            ],
            insertHtml: [
                { text: "Request.FirstName", value: "#Request.FirstName#" },
                { text: "Request.LastName", value: "#Request.LastName#" }
            ]
        });
    });
0
Kevn
Top achievements
Rank 1
answered on 25 Sep 2012, 01:39 PM
Wow I finally got the solution (see below).  

Does anyone know how to add tooltips for EACH "InsertHtml" item?

        $("#editor").kendoEditor({             messages: {insertHtml : "Tokens"},             tools: [                 "bold",                 "italic",                 "underline",                 "strikethrough",                 "fontName",                 "fontSize",                 "foreColor",                 "backColor",                 "insertHtml",             ],             insertHtml: [                 { text: "Request.FirstName", value: "#Request.FirstName#" },                 { text: "Request.LastName", value: "#Request.LastName#" }             ]         });
0
Courouble Damien
Top achievements
Rank 1
answered on 25 Sep 2012, 01:39 PM
$(document).ready(function () {
        $("#editor").kendoEditor({
            tools: [
                "bold",
                "italic",
                "underline",
                "strikethrough",
                "fontName",
                "fontSize",
                "foreColor",
                "backColor",
                "insertHtml",
            ],
            insertHtml: [
                { text: "Request.FirstName", value: "#Request.FirstName#" },
                { text: "Request.LastName", value: "#Request.LastName#" }
            ], 
	    messages : {
            insertHtml : "My Custom translations"
    }

        });
    });
0
Courouble Damien
Top achievements
Rank 1
answered on 25 Sep 2012, 01:40 PM
Exactly !
0
Kevn
Top achievements
Rank 1
answered on 25 Sep 2012, 01:44 PM
Do you know how (or if you can) add tooltips for EACH "InsertHtml" item?

Thank you for the super quick responses.  We posted the answer at almost the exact same time. :-)

0
Sébastien
Top achievements
Rank 1
answered on 07 Oct 2012, 11:51 AM
Thank you Damien, it works nice. Now I can remove my workaround.:-)



Seb
Tags
Editor
Asked by
Sébastien
Top achievements
Rank 1
Answers by
Courouble Damien
Top achievements
Rank 1
Kevn
Top achievements
Rank 1
Sébastien
Top achievements
Rank 1
Share this question
or