How to Use PasteCleanup feature in kendo editor - Asp.Net MVC

2 posts, 0 answers
  1. vibhor
    vibhor avatar
    1 posts
    Member since:
    Apr 2016

    Posted 17 Jul Link to this post

    I am using the paste cleanup feature with version 2016.2.504 


    I am getting error.
    Kendo.MVC.UI.Fluent.EditorBuilder' does not contain a definition for 'PasteCleanup' and no extension method 'PasteCleanup' accepting a first argument of type 'kendo.MVC.UI.Fluent.EditorBuilder' could be found.


    Could you please help in this?

     

    Just to add more details to above query -


    Here is my kendo editor definition like tbelow:


    @(Html.Kendo().Editor()
                .Name("ManuscriptFormTextEditor")
                 .PasteCleanup(p => p
                        .All(false)
                        .Css(false)
                        .KeepNewLines(false)
                        .MsAllFormatting(false)
                        .MsConvertLists(true)
                        .MsTags(true)
                        .None(false)
                        .Span(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()
                      .Formatting()
                      .CleanFormatting()
                      //.FontName()
                      .FontName(items => items
                                .Add("Arial", "Arial")
                                .Add("Arial Narrow", "Arial Narrow")
                                .Add("Calibri", "Calibri")
                                .Add("Courier New", "Courier New")
                                .Add("Tahoma", "Tahoma")
                                .Add("Times New Roman", "Times New Roman")
                                .Add("Verdana", "Verdana")                                                        
                                )
                      //.FontSize()
                      .FontSize()
                      .FontColor().BackColor()
                      //.Print()
                  )
                  .HtmlAttributes(new { style = "width: 100%;height:500px;text-align:center;font-size:14px;" })
                  .Encode(false)
                  .Value(@<text>@Html.Raw(@ViewBag.ManuscriptFormText)</text>)
        )     


    It is not throwing any error if i remove the code :
     .PasteCleanup(p => p
                        .All(false)
                        .Css(false)
                        .KeepNewLines(false)
                        .MsAllFormatting(false)
                        .MsConvertLists(true)
                        .MsTags(true)
                        .None(false)
                        .Span(false)
                     )

  2. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 18 Jul Link to this post

    Hi,

    Thank you for contacting us.

    I tested the provided code, but I was not able to reproduce the problem. For you convenience I am attaching a small video with my test. Just run the swf file in the archive in an adobe flash enabled browser and  tell me if I am doing anything wrong in the test.

    Could you confirm that the version of Kendo.Mvc.dll you are referencing is in fact 2016.2.504?




    Regards,
    Stanimir
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top