Search Results

Search found 2 results on 1 pages for 'raybiez'.

Page 1/1 | 1 

  • Drag-n-Drop on contentEditable elements

    - by Raybiez
    There are numerous WYSIWYG editors available on the internet, but I'm yet to find one that implements some form of drag-n-drop implementation. It is easy to create one's own editor, but I want to the user to be able to drag elements (ie. tokens) from outside the editable area and have them drop it at a location of their choice inside the editable area. It is easy to inject html at a specific location of an editable element, but how do one determine where the caret should be when the user is dragging a DIV over some element in the editable area. To better illustrate what I'm trying to explain, see the following scenario. The editable area (either an IFRAME in edit mode or a DIV with its contentEditable attribute set to true) already contains the following text: "Dear , please take note of ...." The user now drags an element representing some token from a list of elements, over the editable area, moving the cursor over the text until the caret appear just before the comma (,) in the text as shown above. When the user releases the mouse button at that location, HTML will be injected which could result in something like this: "Dear {UserFirstName}, please take note of ...". I do not know if anyone has ever done anything similar to this, or at least know of how one would go about doing this using JavaScript. Any help will be greatly appreciated.

    Read the article

  • Custom Web Control - ParseChildren & Resource Objects

    - by Raybiez
    I hope someone can help me. I have the following custom server control: [ParseChildren(true)] public class MyControl : WebControl, INamingContainer { [PersistenceMode(PersistenceMode.InnerProperty)] public string MyProperty { get;set; } } It works perfectly with the following mark-up: <acme:MyControl runat="sever"> <MyProperty>Test String</MyProperty> </acme:MyControl> But if I try to localise the property string, I get a parse error: <acme:MyControl runat="sever"> <MyProperty><%=(string)GetLocalResourceObject("MyResourceKey") %></MyProperty> </acme:MyControl> Even if I cast the type, ASP.NET indicates that the property cannot accept controls as children. How should the expression look like if I want to localise it? I can make the property accessible as an attribute of the control's tag, but I prefer the mark-up above, it looks more elegant and clean. Thanks

    Read the article

1