Macro to produce simple HTML

Get help using and writing Nisus Writer Pro macros.
Post Reply
ralph strauch
Posts: 31
Joined: 2003-08-14 08:27:57
Location: Los Angeles, CA
Contact:

Macro to produce simple HTML

Post by ralph strauch »

I'm looking for a macro that will convert a Nisus document to simple HTML -- bold, italics, lists, etc., without the all the css formatting that "Export to HTML" produces. I've found references in the forum to a blog conversion macro by loulesko that looks like it might do the trick but don't see that macro in the macro repository. Is it available somewhere, or is there another macro available that would do this job?

TIA
User avatar
martin
Official Nisus Person
Posts: 5227
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Macro to produce simple HTML

Post by martin »

Hi Ralph,

You mentioned Lou's macro, which finds hyperlinks and insert's HTML's "A" link tags, but doesn't help with other formatting (eg: bold). Jerry Stratton has written some HTML macros, but they're a bit complicated and specific to his needs, and are more concerned with style information.

Well, we don't have such a macro available, but it's always possible to put something together. I'm attaching a macro that does a very basic job of converting to simple HTML. It does bold, italic, underlines, links (thanks to Lou for the code), and a few special characters. Besides list styles, what else did you need?
Attachments
Basic HTML.nwm
(19.2 KiB) Downloaded 665 times
ralph strauch
Posts: 31
Joined: 2003-08-14 08:27:57
Location: Los Angeles, CA
Contact:

Re: Macro to produce simple HTML

Post by ralph strauch »

Thanks, Martin. That gives me a start on what I need. What I'm after, basically, is the ability to draft a web page in Nisus and then paste it into Wordpress or PageSpinner with the basic formatting (bold, italics, lists, links, etc.) intact. The macro of loulesko's I was asking about is the one he refers to as "a macro that converts a Nisus document to blog friendly text" in the link you posted above. He also refers to it in

http://www.nisus.com/forum/viewtopic.php?f=17&t=3373

I looked for that macro in the macro repository and couldn't find it there. I'll look more closely at Jerry Stratton's stuff.

Nisus's "export as HTML" option just does too much -- trying to exactly reproduce the formatting in Nisus. Also, it sticks in code like "<span class="Apple-converted-space"> </span>" in random places and I can't see what's causing it. The Nisus export option would be much more useful, I think, if it were more configurable so the user could decide how much detail it should contain.
Post Reply