This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Suggest action added to context menu of NB editor for all MIME types, active when there is a selected region. Would scan that region for editor syntax highlighting information (i.e. token boundaries). Would then generate HTML which formats that code snippet inside <pre> tags, escaping '&' etc., with <font class="..."> tags wrapped around tokens to highlight them. Resulting HTML would be copied to clipboard for pasting into an HTML document. Would be nice to have a reverse action, active when selected region is inside <pre> tags: strip out any HTML tags and deescape '&' etc., then copy to clipboard for pasting back into code samples. See URL for an example impl in Emacs. Use: people creating documents using netbeans.css to include code samples (Java, XML, ...).
Target milestone was changed from '3.4' to TBD.
*** Issue 21136 has been marked as a duplicate of this issue. ***
Probably giving up on this. Editor has a Save as HTML action, so you can presumably do some search-and-replace on the result to produce a netbeans.org-friendly snippet. Or, you can just use Emacs and it's easy.
He, he, he, you can use emacs for any(and every)thing.