Reply to topic  [ 4 posts ] 
Convert to HTML Macro for Writers 
Author Message
User avatar

Joined: 2008-01-20 11:08:35
Posts: 89
Location: California
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 34 times


Last edited by loulesko on 2017-02-25 17:47:58, edited 4 times in total.

2013-10-20 15:55:22
Profile WWW
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
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.


2013-10-30 14:28:46
Profile WWW

Joined: 2007-10-21 14:59:09
Posts: 272
Lou, thank you very much. Very useful!

Paolo


2014-05-17 07:31:56
Profile
User avatar

Joined: 2008-01-20 11:08:35
Posts: 89
Location: California
My pleasure Paolo, I 'm thrilled you find it useful.

Lou


2014-05-28 17:38:35
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software