First of all, someone should review the code in these forums so that if a user hits the backspace key when creating a new post the page does not navigate back! So this is my second attempt to post this question because my first 95% complete post was vaporized when I hit the backspace key. [arg!]
I am basing the code from this documentation:
http://docs.telerik.com/kendo-ui/controls/editors/editor/overview
I have a razor form with two editors on them and am formatting them as in the link above but they are showing up as read only. Also the data from the model is not populating the control. I tried using a standard input control as well with the same results.
Here is the code:
<
p
>
@Html.TextAreaFor(m => m.Test.IntroText, new {style = "width:591px", id = "introtext"})
</
p
>
I tried removing the style attribute above with no change.
Here is the JavaScript:
$(
"#thankyoutext"
).kendoEditor({
resizable: {
content:
true
,
toolbar:
true
,
editable :
true
<<-- Just tried that does not change anything
},
tools: [
"bold"
,
"italic"
,
"underline"
,
"strikethrough"
,
"justifyLeft"
,
"justifyCenter"
,
"justifyRight"
,
"justifyFull"
,
"insertUnorderedList"
,
"insertOrderedList"
,
"indent"
,
"outdent"
,
"createLink"
,
"unlink"
,
"insertImage"
,
"insertFile"
,
"subscript"
,
"superscript"
,
"createTable"
,
"addRowAbove"
,
"addRowBelow"
,
"addColumnLeft"
,
"addColumnRight"
,
"deleteRow"
,
"deleteColumn"
,
"viewHtml"
,
"formatting"
,
"cleanFormatting"
,
"fontName"
,
"fontSize"
,
"foreColor"
,
"backColor"
,
"print"
]
});
var
editor = $(
"#thankyoutext"
).data(
"kendoEditor"
),
editorBody = $(editor.body);
editorBody.attr(
"contenteditable"
,
true
).find(
"a"
).off(
"click.readonly"
);
Can someone help explain why it is greyed, read-only and does not contain data from the model?
Reid