WebTextEditor - Value in TextEditor Section

1 reply. Last post: March 18, 2011 2:41 AM by Yudi
Tags :
  • New Discussion
  • New Question
  • New Product Feedback

Hello,

I have a WebGrid cell containing data made up of text and html markup (tags, urls, links, images, etc) from a sql database table.

When I use WebTextEditor as custom editor in WebGrid, everything in the grid cell, including html and images, is returned in the editor (see image 1).  But when I copy the grid cell content in a section of a standalone WebTextEditor, only plain text is copied from the grid to the editor section (see image 2), because the client side method used only calls for Text.

How can I modify this code to copy everything (text and html markup) from the grid cell to the editor, so that I can use WebtextEditor interchangeably in custom editor in Webgrid or standalone modes to edit the same data?  

Regards,

Jean

        function doSomething () {

            var grid = ISGetObject("WebGrid1");

            var rte = ISGetObject("textEditor");

            var selectedObject = grid.GetSelectedObject           

            if (selectedObject != null) {

                var selectedRow = selectedObject.ToRowObject();

                var cells = selectedRow.GetCells();

                rte.SetValue(cells.GetNamedItem("GridCellName").Text, "EditorSectionName");

            }

            returntrue;

        }
All times are GMT -5. The time now is 2:02 AM.
Previous Next