Hello there,
I'm trying to use both snippets (to make a shortcode for our users to add templated Links) and pasteCleanup option (to prevent any style to be import from a copy paste) but it seems like the pasteCleanUp option is preventing my html tags from snippets to be added.
Here my code :
@(Html.Kendo().Editor()
.Name(ViewData.TemplateInfo.HtmlFieldPrefix)
.HtmlAttributes(new { style = ViewData["style"], @class = ViewData["class"] })
.Resizable(resizable => resizable.Content(true).Toolbar(true))
.Value(@Model)
.Encode(false)
.PasteCleanup(paste => paste.All(true))
.Tools(tools => tools
.Clear()
.Bold().Italic().Underline().Strikethrough()
.JustifyLeft().JustifyCenter().JustifyRight().JustifyFull()
.CreateLink().Unlink()
.TableEditing()
.Snippets(snippets =>
{
snippets.Add("Test", " <a class='testclass' href='www.test.com'>TestLink</a> ");
})
.FontColor().BackColor()
.CleanFormatting()
.ViewHtml()
)
If I don't remove the line
.PasteCleanup(paste => paste.All(true))
All I can get from my snippet is "TestLink" instead of "
<a class='testclass' href='www.test.com'>TestLink</a>
But maybe i'm doing this wrong ?
Thx a lot.
Cordialy