Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Drag and drop html text question

Hello Everybody,
 I am new to Eclipse plugin development. For my project, I created a tree
viewer with the drag and drop functionality. The drop target is the ActiveX
controlled plugin running in the design mode on eclipse. The drag source is
the view that I created with my objects as tree nodes. The required
functionality is to drag a node and drop it as html in the activeX browser.
For e.g. if I drag a node called "Leaf1" into the browser, I will have to
see <h3>Leaf1</h3>. I have created all the functionality for drag drop and
modifying Leaf1 to <h3>Leaf1</h3>. But the problem I have is that the
browser
1. Doesn't recognize the string <h3>Leaf1</h3> as html
2. Because of point 1 above it doesn't highlight the string Leaf1 with the
header h3.
 So what I see in the browser is <h3>Leaf1</h3> instead of Leaf1 highlighted
bolded by header h3. The reason being the string that I drag is escaped
either somewhere during the transfer or somewhere during the drop. I tried
using RTFTransfer, TextTransfer, EditorInputTransfer etc. still the same...
the string is always treated by the browser as the raw string in the text
area and escaped.
 Is there anything like in RTFTransfer where if you specify the string as
"{\\rtf1 \\b\\i " + <text> + "}", it's treated as a rich text format by the
browser intrepreted, so in this case, the <text> is bolded and italicized by
the browser?
 I tried copying html from different websites and pasted into the browser
and it works, so I believe it's gotta do with the way I transfer the string
or because I am ignoring some kind of flag in the string that tells the
browser that the passed string should be intrepreted as html string and not
plain text. Thanks for reading this big email and your help in either
solving this or pointing me in the right direction is greatly appreciated.

Thanks,
Guru.




Back to the top