Hi there,
This post was updated to a newer version of this macro on 2/25/2017
This is a refined version of a macro I started a while back. It converts your Nisus document text to HTML (including links), headers 1-6, tables, numbered and bullet lists all get converted.
It also does some nice things for writers like converting opening and closing quotes to their proper HTML entities, it also does the same for ampersands, EM dashes and EN dashes. It also puts in paragraph tags and double carriage returns between paragraphs for cleaner text that you can easily read after pasting.
This macro requires that you have your styles for headings listed as "Heading 1", "Heading 2". "Heading 3" etc, "Blockquote", "Bullet List", "Number List" in your style sheet - these are all the default names, so you probably won't have to do a thing.
This latest version uploaded 2/25/17 fixes a few annoyances like if a list was that the end of a document and didn't have a following carriage return, the last list item tag would get swapped with the OL or UL tag, that is now not problem.
best
Lou
Convert to HTML Macro for Writers
Convert to HTML Macro for Writers
- Attachments
-
- Copy-as-HTML.nwm.zip
- (3.85 KiB) Downloaded 895 times
Last edited by loulesko on 2017-02-25 17:47:58, edited 4 times in total.
- martin
- Official Nisus Person
- Posts: 5230
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Re: Convert to HTML Macro for Writers
Thanks for sharing this Lou! Even though NWP does have a built-in HTML export, it tends to be rather overwrought in terms of CSS/HTML tags because it's produced by Apple's WebKit, intended to be shown/interpreted by web browsers. It's not the kind of thing that's very pleasant to hand edit. Your macro does a much better job of producing simple hand-editable HTML.
Re: Convert to HTML Macro for Writers
Lou, thank you very much. Very useful!
Paolo
Paolo
Re: Convert to HTML Macro for Writers
My pleasure Paolo, I 'm thrilled you find it useful.
Lou
Lou