SHFB icon indicating copy to clipboard operation
SHFB copied to clipboard

Is there a WYSIWYG tool to edit MAML files

Open wmjordan opened this issue 7 years ago • 11 comments

Instead of messing with MAML file tags, is there a WYSIWYG tool to edit MAML files?

wmjordan avatar Aug 28 '17 08:08 wmjordan

There aren't any available that I'm aware of. Dave Sexton started to create one but as far as I know it was abandoned and the source code was never released.

@RxDave Not sure if you'll see this but, if so, would you consider open sourcing what you did complete of your MAML editor so that I or someone else can have a go at finishing it?

EWSoftware avatar Aug 28 '17 19:08 EWSoftware

That should be doable. I don't remember the state in which I left it, but I'll take a look after work today.

RxDave avatar Aug 28 '17 21:08 RxDave

👍

Cool idea. I might not use it, but would encourage making it open source if it's something that worked reasonably well. :smile:

sharwell avatar Aug 28 '17 21:08 sharwell

I don't think it worked reasonably well, which is why I never followed through with it :D But let's see.

RxDave avatar Aug 28 '17 22:08 RxDave

Here ya go: https://github.com/RxDave/XMLGel

I'm interested to see if you can do something with this.

RxDave avatar Aug 28 '17 23:08 RxDave

Thanks, I appreciate it. I'll see what I can do.

EWSoftware avatar Aug 29 '17 01:08 EWSoftware

Thank you! @RxDave and @EWSoftware! I am looking forward to the reincarnation of the resurrected project.

wmjordan avatar Aug 29 '17 08:08 wmjordan

@EWSoftware Maybe there is an alternative to build a visual MAML editor. Since HTML editors are relatively easier to find, maybe it is possible to implement the WYSIWYG HTML->MAML editor in an XSLT-supported way.

  1. Program some XSLT documents,
  2. Author help files with HTML editors, which generate documents with simple markups, such as <p>, <h1>, <a>, etc,
  3. Use XSLT to transform HTML documents (with the help of some existing HTML readers, for instance, https://github.com/lovettchris/SgmlReader) into the MAML format. Or even simpler, use an HTML reader to extract the <body> content, and inject it into HTML templates.

wmjordan avatar Aug 29 '17 08:08 wmjordan

MAML documents are much more structured than HTML and there are several different types. Each document type can vary with regard to required and optional elements, subsections can be nested within other sections, and there are many places where attributes define how a particular element is rendered (i.e. code block language and title, alert types, not to mention addressable elements like sections that can be used in link targets. I don't think that kind of stuff can be easily put into an HTML editor and round tripped between formats.

Also, something like the glossary document type wouldn't work well being edited in a WYSIWYG format. Those would be better off with some form of customized UI to define the glossary terms and edit their definitions.

The point of using MAML is that you define the structure of the content, not the layout or style. The presentation style handles that part. It also allows you to generate the MAML content in different output formats (HTML, markdown, or Open XML for example). Using a simplistic approach where all you use is HTML templates loses all of that functionality.

EWSoftware avatar Sep 03 '17 01:09 EWSoftware

I found an HTML to MAML Converter tool in the extra folder. I thought it was possible to utilize that tool to easier the process of MAML authoring. However, I could not figure out how to make a link which point to the API documentation part.

wmjordan avatar Jan 03 '18 07:01 wmjordan

The intended use for the HTML to MAML converter is to convert old HTML content to MAML content in a one time conversion. As noted in the help for it, there can be several tasks to handle in the converted content so it's not for general use on a regular basis.

EWSoftware avatar Jan 03 '18 15:01 EWSoftware