logo WinWrap®
September 25, 2011

Include Color-Coded Scripts in Your Documentation

The WinWrap® Basic IDE now supports HTML clipboard data. Paste color-coded scripts from the WinWrap® Basic IDE into any HTML clipboard compatible document. Developers can include color coded scripts in their documentation. Users can improve their script documentation.

WinWrap® Basic HTML Clipboard Data

  • Developers can include color coded scripts in their documentation
  • Users can improve their script documentation
  • Both HTML data and Text data are copied to the clipboard
  • HTML data compatible applications will paste the HTML data
  • WinWrap® Basic HTML clipboard data maintains the script color encodings

HTML Clipboard Data Support

  • Scripts are color-coded in the WinWrap® Basic IDE
Scripts are color-coded in the WinWrap® Basic IDE
  • HTML clipboard data is copied out of the WinWrap® Basic IDE

Raw HTML Clipboard Data

  • Paste script data into any HTML clipboard compatible application
  • Use find and replace to modify colors as needed
  • HTML clipboard data is pasted from the clipboard as an HTML fragment
Version:1.0
StartHTML:091
EndHTML:000001202
StartFragment:246
EndFragment:000001163

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>The HTML Clipboard</TITLE>
</HEAD>
<BODY>
<!--StartFragment -->
<pre style="color:#000000"><span style="color:#006400">'#Language &quot;WWB-COM&quot;</span>
<span style="color:#00008b">Sub</span> <span style="color:#000000">Main</span>
    <span style="color:#00008b">Dim</span> Items(0 <span style="color:#00008b">To</span> 2) <span style="color:#00008b">As</span> <span style="color:#00008b">String</span>
    Items(0) = <span style="color:#8b0000">&quot;Item &amp;1&quot;</span>
    Items(1) = <span style="color:#8b0000">&quot;Item &amp;2&quot;</span>
    Items(2) = <span style="color:#8b0000">&quot;Item &amp;3&quot;</span>
    X = <span style="color:#008b8b">ShowPopupMenu</span>(Items) <span style="color:#006400">' show popup menu</span>
    <span style="color:#00008b">Debug</span><span style="color:#0000ff">.Print</span> X <span style="color:#006400">' item selected</span>
<span style="color:#00008b">End</span> <span style="color:#00008b">Sub</span>
</pre><!--EndFragment -->
</BODY>
</HTML>

HTML Clipboard Data Pasted Into a LibreOffice Document

This LibreOffice word document was created by combining WinWrap® Basic help information with actual script data copied into the document via the html clipboard data capability.

HTML Clipboard Data Pasted Into a LibreOffice Document

HTML Clipboard Format

  • The basic function of clipboard copy and paste is enhanced with the ability to handle html data
  • Allows for easy transfer of data between applications as all applications can access the clipboard
  • When data is pasted into another application the format closest to that applications native format is used to preserve as much of the original data as possible
http://msdn.microsoft.com/en-us/library/aa767917(v=vs.85).aspx
"This Microsoft article discusses cutting and pasting fragments of an HTML document. The CF_HTML clipboard format allows a fragment of raw HTML text and its context to be stored on the clipboard as ASCII. This allows the context of the HTML fragment, which consists of all preceding and surrounding tags, to be examined by an application so that the surrounding tags can be noted with their attributes. The only character set supported by the clipboard is Unicode in its UTF-8 encoding."

Copyright Polar Engineering, Inc.