This question is locked. New answers and comments are not allowed.
hi,
I have added a client event to the editor. Which result to the toolbar hiding when the editor loses focus. Found this on the fora
This works great except for the dropdowns (like font size) in Safari. The moment the user selects the drop down the editor considers's it's focus lost and the toolbar disappears.
Is there a work-round for this ? We have a lot of Apple users and I do like Safari myself too. The solution has to be generic, as the editor is in a template.
kind regards
Peter
I have added a client event to the editor. Which result to the toolbar hiding when the editor loses focus. Found this on the fora
@using Telerik.Web.Mvc.UI
@model string
@{
var documentName = ViewData.TemplateInfo.HtmlFieldPrefix;
var hideShowFunction = "HideShow" + documentName;
string documentContent = HttpUtility.HtmlDecode(ViewData.TemplateInfo.FormattedModelValue.ToString());
}
<
script
type
=
"text/javascript"
>
function @(hideShowFunction)() {
var editor = $("#@documentName").data("tEditor");
$(editor.window).bind("focus", function () {
$("#@documentName .t-editor-toolbar").show();
}).bind("blur", function () {
$("#@documentName .t-editor-toolbar").hide();
});
$("#@documentName .t-editor-toolbar").hide();
}
</
script
>
@(
Html.Telerik().Editor()
.Name(documentName)
.ClientEvents(events => events.OnLoad(hideShowFunction))
.Value(documentContent)
.HtmlAttributes(new { style = "height:120px" }))
This works great except for the dropdowns (like font size) in Safari. The moment the user selects the drop down the editor considers's it's focus lost and the toolbar disappears.
Is there a work-round for this ? We have a lot of Apple users and I do like Safari myself too. The solution has to be generic, as the editor is in a template.
kind regards
Peter