Page 1 of 1

Macro to produce simple HTML

Posted: 2012-06-26 09:06:37
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?


Re: Macro to produce simple HTML

Posted: 2012-06-26 15:12:18
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?

Re: Macro to produce simple HTML

Posted: 2012-06-26 16:49:15
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

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.