nisus.com
https://www.nisus.com/forum/

Convert to HTML Macro for Writers
https://www.nisus.com/forum/viewtopic.php?f=17&t=5494
Page 1 of 1

Author:  loulesko [ 2013-10-20 15:55:22 ]
Post subject:  Convert to HTML Macro for Writers

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

Attachments:
Copy-as-HTML.nwm.zip [3.85 KiB]
Downloaded 36 times

Author:  martin [ 2013-10-30 14:28:46 ]
Post subject:  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.

Author:  ptram [ 2014-05-17 07:31:56 ]
Post subject:  Re: Convert to HTML Macro for Writers

Lou, thank you very much. Very useful!

Paolo

Author:  loulesko [ 2014-05-28 17:38:35 ]
Post subject:  Re: Convert to HTML Macro for Writers

My pleasure Paolo, I 'm thrilled you find it useful.

Lou

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/