Exemple #1
0
 /// <summary>
 /// Returns html to render Ckeditor for the specified model property
 /// </summary>
 /// <typeparam name="TModel"></typeparam>
 /// <typeparam name="TProperty"></typeparam>
 /// <param name="htmlHelper"></param>
 /// <param name="expression"></param>
 /// <param name="config">A Ckeditor config object which can contain any setting mentioned here: http://docs.ckeditor.com/#!/api/CKEDITOR.config e.g. new { height = 500 }</param>
 /// <returns></returns>
 public static MvcHtmlString CkeditorFor <TModel, TProperty>(this HtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TProperty> > expression, object config = null)
 {
     return(htmlHelper.EditorFor(expression, "Ckeditor", new { @class = "cke_rtl", Config = config, htmlAttributes = new { @class = "cke_rtl" } }));
 }