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

Toolbar disappears with Editor inside Window

2 Answers 317 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 13 Apr 2015, 03:03 PM

I have a Kendo UI Editor inside a Kendo UI Window. It works fine, but if you highlight some text the toolbar disappears and you can't format it. Clicking outside the editor and then back inside brings the toolbar back, but it will disappear once again if you try to select text. I do not have this issue if I move the editor outside the window. Is there something I'm missing, or is this a bug with the Editor inside a Window?

Here is my code:

@{ 
    Html.Kendo().Window()
            .Name("dlgEmail")
        .Title("New Email")
        .Actions(actions => actions
            .Close()
        )
        .Content(@<text>
            @using (Html.BeginForm("SendEmailWithAttachment", "Donor", FormMethod.Post, new { id = "frmEmail" }))
            {
                <p class="validateTips">
                </p>
                <fieldset>
                    <table>
                        <tr>
                            <td>To:</td>
                            <td>
                                @Html.Kendo().MultiSelectFor(m => m.EmailWithAttachment.ToEmail).Name("ddlTo").BindTo(Model.EmailSelectList).Placeholder("Select address(es)...")
                            </td>
                        </tr>
                        <tr>
                            <td>BCC (Optional):</td>
                            <td>
                                @Html.Kendo().TextBoxFor(m => m.EmailWithAttachment.BCC).Name("txtBCC").HtmlAttributes(new { style = "width: 200px;" })
                            </td>
                        </tr>
                        <tr>
                            <td>Subject:</td>
                            <td>
                                @(Html.Kendo().TextBoxFor(m => m.EmailWithAttachment.Subject)
                                .Name("txtSubject")
                                .HtmlAttributes(new { style = "width: 200px;" }))
                            </td>
                        </tr>
                    </table>
                    <br />
                    @(Html.Kendo().EditorFor(m => m.EmailWithAttachment.Body)
                            .Name("txtEmailBody")
                            .Tag("div")
                            .HtmlAttributes(new { style = "width: 450px; height: 200px;" })
                            .Tools(tools => tools
                            .Clear()
                            .Bold().Italic().Underline()
                            .JustifyLeft().JustifyCenter().JustifyRight()
                            .InsertUnorderedList().InsertOrderedList()
                            .Outdent().Indent()
                            .CreateLink().Unlink()
                            .InsertImage()
                            .ViewHtml()
                            .FontName()
                            .FontSize()
                            .FontColor())
                            .Messages(messages => messages
                            .InsertOrderedList("Insert numbered list")
                                .InsertUnorderedList("Insert bulleted list"))
                                .Events(events => events.Paste("onEditorPaste"))
                    )
 
                    <input id="chkIncludeSignature" type="checkbox" /> <span>Include saved signature? (Signature defined in the My Profile tab.)</span>
                    <br />
                    <br />
                    <div id="divAttachments">
                        <span>Attachments (Optional):</span>
                        @(Html.Kendo().Upload()
                            .Name("EmailAttachments")
                        .HtmlAttributes(new { accept = ".png,.jpg,.gif,.xls,.xlsx,.doc,.docx,.pdf,.txt" })
                        )
                    </div>
                </fieldset>
                <div style="clear: both;">
                    <div style="float: right;">
                        <span id="lblEmailSendStatus"></span>
                        <img id="imgEmailSendStatus" class="loading-invisible" src="~/Image/ajax-loader.gif" alt="" />
                        <input type="submit" id="btnEmailSave" class="k-button" value="Send" />
                        <span id="btnEmailCancel" class="k-button">Cancel</span>
                    </div>
                </div>
            }
        </text>)
        .Modal(true)
        .Draggable()
        .Resizable()
        .Width(500)
        .Visible(false)
        .Render();
}

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 15 Apr 2015, 12:18 PM
Hello Jon,

Please check the following documentation article:

http://docs.telerik.com/kendo-ui/web/editor/how-to/inline-editor-inside-window

Regards,
Dimo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jon
Top achievements
Rank 1
answered on 21 Apr 2015, 03:57 PM
Thank you, that fixes it for me!
Tags
Editor
Asked by
Jon
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Jon
Top achievements
Rank 1
Share this question
or