-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extra highlights not included in Copy or Export #15
Comments
As clarified in the forum thread, the original poster's need was to copy highlights from one file in NPP to another. Since the NppExport plugin uses the Windows clipboard formats, and NPP itself will only paste from the plaintext entry in the clipboard, NppExport won't help the OP. However, after my experiments, I would still expect the copy-to-HTML and export-to-HTML to include "extra" stylings, such as the Mark... > Using 3rd Style. However, I don't frequently use this feature, so it's not an urgent request. But it would be nice, eventually, to include the"extra" highlights in the export/copy using this plugin. |
Though maybe that is handled by SCI_STYLEGETHOTSPOT(https://www.scintilla.org/ScintillaDoc.html#SCI_STYLEGETHOTSPOT), but that is something different and not relevant here. The relevant part seems to be:
with e.g. execute(SCI_INDICSETSTYLE, SCE_UNIVERSAL_FOUND_STYLE_EXT1, INDIC_ROUNDBOX); and further calls with: SCI_INDICATOR... see e.g. https://www.scintilla.org/ScintillaDoc.html#SCI_INDICATORVALUEAT |
This recent Community Forum discussion shows that there are still users out there who want my original interpretation -- that is, that the user-applied additional styling (such as Mark Using Nth Style) get put in the exported RTF or HTML, not just the lexer styling. |
User applied 1th-5th style is handled additionally to the styling which is currently retrieved in code via SCI_GETSTYLEDTEXT. So current response from SCI_GETSTYLEDTEXT in dataBuffer seems to be not easily usable. Additionally multiple indicators could be set for the same text part. |
As discussed in https://community.notepad-plus-plus.org/topic/19448/copying-highlighted-text-lines-from-1-notepad-file-to-another/:
if I have additional styling (such as Mark Using 3rd Style), that extra styling isn't included in the Copy HTML or RTF to clipboard.
Not mentioned in that thread: the same is true for Export to HTML or RTF.
I'm not sure whether it's a bug report or a feature request, but either way, the reasonable expectation is that all highlighting -- whether from active lexer/syntax highlighter or from user-applied Styles, Marks, etc -- would be included in the Export/Copy-to HTML/RTF.
I tried with both v0.2.9.21 that came bundled with Notepad 7.8.6, and the newer v0.3.0 which isn't in nppPluginList yet.
The text was updated successfully, but these errors were encountered: