I've got a Kendo editor with custom CSS styles that I'm importing via a custom style sheet. Is there a way to apply the classes to the p element instead of wrapping the text with a span element. I'm trying to control how the user formats the text to just the classes in my style sheet.
Thanks.
@(Html.Kendo().EditorFor(model => model.HtmlContent)
.HtmlAttributes(new { style = "width: 85%;height:600px;" })
.Encode(false)
.Tools(tools => tools
.Clear()
.Bold().Italic().Underline().Strikethrough()
.JustifyLeft().JustifyCenter().JustifyRight().JustifyFull()
.InsertUnorderedList().InsertOrderedList()
.Outdent().Indent()
.CreateLink().Unlink()
.InsertImage()
.InsertFile()
//.SubScript()
//.SuperScript()
.TableEditing()
.ViewHtml()
.CleanFormatting()
//.FontName()
//.FontSize()
//.FontColor().BackColor()
.Formatting(formatting => formatting
.Add("Intro Paragraph", ".doc-intro-paragraph")
.Add("FAQ Question", ".doc-question")
.Add("FAQ Answer", ".doc-answer")
.Add("Section Title", ".doc-section-title")
)
)
.PasteCleanup(p => p
.All(false)
.Css(true)
.KeepNewLines(false)
.MsAllFormatting(true)
.MsConvertLists(true)
.MsTags(true)
.None(false)
.Span(true)
)
.StyleSheets(css => css.Add(Url.Content("~/Content/TextEditor.css")))
.ImageBrowser(imageBrowser => imageBrowser
.Image("~/Content/Images/{0}")
.Read("Read", "ImageBrowser")
.Create("Create", "ImageBrowser")
.Destroy("Destroy", "ImageBrowser")
.Upload("Upload", "ImageBrowser")
.Thumbnail("Thumbnail", "ImageBrowser")
)
.FileBrowser(fileBrowser => fileBrowser
.File("~/Content/Documents/{0}")
.Read("Read", "FileBrowser")
.Create("Create", "FileBrowser")
.Destroy("Destroy", "FileBrowser")
.Upload("Upload", "FileBrowser")
)
)