﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebTextEditor - Insert text from ContextMenu</title><link>http://www.intersoftsolutions.com/Community/WebTextEditor/Insert-text-from-ContextMenu/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Insert text from ContextMenu</title><link>http://www.intersoftsolutions.com/Community/WebTextEditor/Insert-text-from-ContextMenu/</link><pubDate>Wed, 21 Apr 2010 06:43:23 GMT</pubDate><dc:creator>cchl</dc:creator><description>&lt;p&gt;Thank you for your solution, it works perfectly.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Christian&lt;/p&gt;</description></item><item><title>Insert text from ContextMenu</title><link>http://www.intersoftsolutions.com/Community/WebTextEditor/Insert-text-from-ContextMenu/</link><pubDate>Tue, 20 Apr 2010 22:49:40 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;You coud use the OnEditorContextMenu client side event handler for such scenario as detailed in WebTextEditor documentation on the article &lt;em&gt;"How-to: Add Item in Context Menu"&lt;/em&gt;&lt;/p&gt;&lt;p&gt;Here is the snippet for your scenario:&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;function WebTextEditor1_OnEditorContextMenu(controlId, menuObj)&lt;br /&gt;{            &lt;br /&gt;    var items = menuObj.RootMenu.Items;&lt;br /&gt;    if (items.GetNamedItem("vCustom") == null)            &lt;br /&gt;    {&lt;br /&gt;        items.Add(new WebMenuSeparatorItem());&lt;br /&gt;        var vCustomItem = new WebMenuItem("vCustom", "vCustomer", null, OnClickItemContext)&lt;br /&gt;&lt;br /&gt;        vCustomItem.Items.Add(new WebMenuItem("vcFirstName", "FirstName", null, OnClickItemContext));&lt;br /&gt;        vCustomItem.Items.Add(new WebMenuItem("vcLastName", "LastName", null, OnClickItemContext));&lt;br /&gt;        vCustomItem.Items.Add(new WebMenuItem("vcAddress", "Address", null, OnClickItemContext));&lt;br /&gt;        vCustomItem.Items.Add(new WebMenuItem("vcPhone", "Phone", null, OnClickItemContext));&lt;br /&gt;&lt;br /&gt;        items.Add(vCustomItem);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function OnClickItemContext(menuItem)&lt;br /&gt;{&lt;br /&gt;    var rte = ISGetObject("WebTextEditor1");&lt;br /&gt;&lt;br /&gt;    var keyword = {&lt;br /&gt;        vcFirstName: "vCustomer.FirstName",&lt;br /&gt;        vcLastName: "vCustomer.LastName",&lt;br /&gt;        vcAddress: "vCustomer.Address",&lt;br /&gt;        vcPhone: "vCustomer.Phone"&lt;br /&gt;    };&lt;br /&gt;&lt;br /&gt;    setTimeout(function()&lt;br /&gt;    {&lt;br /&gt;        rte.SetValueToCurrentPosition(keyword[menuItem.Name]);&lt;br /&gt;    }, 500);&lt;br /&gt;}&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Insert text from ContextMenu</title><link>http://www.intersoftsolutions.com/Community/WebTextEditor/Insert-text-from-ContextMenu/</link><pubDate>Tue, 20 Apr 2010 19:37:35 GMT</pubDate><dc:creator>cchl</dc:creator><description>&lt;p&gt;Hi Andi,&lt;/p&gt;&lt;p&gt;Thank you for answering my question. The component I am using is the WebTextEditor. This is not related to the WebGrid component.&lt;/p&gt;
&lt;p&gt;What I am trying to achieve is basically a mail merge, but without using the build-in mail merge functionality. I need to create a letter template where I can insert labels to be replaced by data from the database. These labels must have the format view.columnName, for instance vInvoice.FirstName. When the end-user opens the letter, the system will replace the labels with data from the database so that the end-user sees the final letter in the editor.&lt;/p&gt;
&lt;p&gt;I already have the code to replace the label with the data from the database, as I am currently using this functionality with another editor, I just need to know how to insert the labels into the letter template using the context menu.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Christian&lt;/p&gt;</description></item><item><title>Insert text from ContextMenu</title><link>http://www.intersoftsolutions.com/Community/WebTextEditor/Insert-text-from-ContextMenu/</link><pubDate>Tue, 20 Apr 2010 12:08:03 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Hi Christian,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; Forgive me, I am having a problem to understand your scenario. Could you kindly be more specific on this? For example, does it related to WebGrid? Do you want to have a context menu that can show a specific column name?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; Perhaps, you wanted to have a context menu and sub context menu that the item is retrieved from particular column. You detail information would be appreciated and it can help me to support you with the right solution.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; Thank you and have a nice day.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Andi Santoso&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Insert text from ContextMenu</title><link>http://www.intersoftsolutions.com/Community/WebTextEditor/Insert-text-from-ContextMenu/</link><pubDate>Tue, 20 Apr 2010 03:33:39 GMT</pubDate><dc:creator>cchl</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I would like to add a menu item to the ContextMenu consisting of the name of a view. The elements in that menu item will be the colums in the view. &lt;/p&gt;
&lt;p&gt;What I would like is for the user to right-click anywhere in the document, select a view and a column, and have viewName.columnName inserted into the document at that precise place. Is this possible?&lt;/p&gt;
&lt;p&gt;I have attached an example of the type of ContextMenu I am looking for.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;br /&gt;Christian Luckow&lt;/p&gt;</description></item></channel></rss>