Posted 14 years ago by tobias weltner
Avatar
Syntax Editor already provides formats for UnicodeText and Text.
I wonder if it was possible to add support for HTML and RTF as VS 2005 does.
Since there exist export capabilities to both formats, why not include them here?

Comments (6)

Posted 14 years ago by tobias weltner
Avatar
Never mind, just discovered "CutCopyDragWithRtf".
You guys are amazing... ;-)
Posted 14 years ago by tobias weltner
Avatar
OK, CutCopyDragWithRtf works for RTF and Text Editors.
Could you *please* also implement a CutCopyDragWithHTML so I can paste my source code into web pages?
Thanx!
Posted 14 years ago by tobias weltner
Avatar
This seems to do it:
Private Sub Editor1_CutCopyDrag(ByVal sender As Object, ByVal e As ActiproSoftware.SyntaxEditor.CutCopyDragEventArgs) Handles Editor1.CutCopyDrag
With e.DataObject
.SetData(System.Windows.Forms.DataFormats.Html, False, Editor1.Document.GetTextAsHtml(HtmlExportType.Inline, LineEndStyle.CarriageReturnNewline))
End With
End Sub

However, I don't know why this works.
GetTextAsHTML returns the entire document text, but clipboard contains only the selected text.
It does contain HTML format.
hm...
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Tobias,

Yes we have an item on our TODO list to allow getting HTML text substrings. The GetTextAsHtml returns the entire doc as HTML. If you need this immediately you can build this functionality yourself by doing what you did with handling CutCopyDrag and calling your own method for building the HTML there. That's exactly why we made that event so you can customize what gets placed on the clipboard.


Actipro Software Support

Posted 14 years ago by tobias weltner
Avatar
Do you by any chance have already included the "partial html" to copy selected code in html format?
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Tobias,

Sorry we only have that for RTF right now.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.