We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Tables in Rich Text Editor

Are tables available yet in the JS2 ASP.NET MVC Rich Text Editor? The documentation implies that they are - but any attempt to add the 'table' element to the toolbar results in the control not rendering.



1 Reply

PO Prince Oliver Syncfusion Team November 23, 2018 11:35 AM UTC

Hi Charles,  

Thank you for contacting Syncfusion support.  

Yes, the support for tables are available in JS2 ASP.NET MVC Rich Text Editor control. We have included table support from version 16.3.21.  Kindly refer to the following release notes for more information:   
  
To enable tables in the RTE’s toolbar, you need to add “CreateTable” to the tools list as shown in the following code.  
  
[View]  
@Html.EJS().RichTextEditor("default").ToolbarSettings(e => e.Items((object)ViewBag.tools)).Value((string)ViewBag.value).Render()  
  
[Controller]  
public ActionResult Index()  
        {  
            ViewBag.value = @"<p>The rich text editor is WYSIWYG ('what you see is what you get') editor useful to create and edit content</p>";  
           
            ViewBag.tools = new[] { "Bold", "Italic", "Underline", "StrikeThrough",  
                            "FontName", "FontSize", "FontColor", "BackgroundColor",  
                            "LowerCase", "UpperCase", "|",  
                            "Formats", "Alignments", "OrderedList", "UnorderedList",  
                            "Outdent", "Indent", "|",  
                            "CreateTable", "CreateLink", "Image", "|", "ClearFormat", "Print",  
                            "SourceCode", "FullScreen", "|", "Undo", "Redo" };  
  
            return View();  
  
        }  

Make sure that you have included the dependent scripts and theme files in the version 16.3.21 or above, in the _layout.cshtml page. We have attached a sample for your reference, please find the sample at the following location 


For more information regarding the Tables in RTE, kindly refer to the following documentation link: https://ej2.syncfusion.com/aspnetmvc/documentation/rich-text-editor/table   

Please let us know if you require any further assistance on this.  
  
Regards,  
Prince 


Loader.
Live Chat Icon For mobile
Up arrow icon