Skip to content

v1.3.0: Improved ArchieML Support

Choose a tag to compare

@brizandrew brizandrew released this 06 Sep 21:41

The default support for ArchieML in earlier versions of Gootenberg only included plain text parsing with links and relied on an HTML parser to do so. This was consistent with the suggested use-case described in the official ArchieML source code.

However, with the release of the new Google Docs API, Google has created their own structured format for exporting docs (which you can see here). This allows for more efficient parsing and also makes rich text conversion much easier.

Starting in version 1.3.0, rich text (i.e. text bolded, underlined, or italicized using Google Docs native methods) will be parsed into a markdown format for easy rendering. For example, the following document:


Screen Shot 2019-09-06 at 5 29 25 PM


Will be parsed into:

{
  "Content": "Lorem [ipsum](https://example.com) dolor **sit** amet, *consectetur* adipisicing ***elit***, sed do _eiusmod_ **[tempor incididunt](https://example.com)** utlabore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolorin reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
}

Note that links are now in their tradional markdown syntax rather than using <a> tags as was done in previous versions. Doing so leaves the rendering of the <a> tag and any class or target preferences to your renderer. (As a React shop, we're partial to using React Markdown).

Also note that changes to the size of the text are ignored. Only bolds, italics, underlines, and links will be converted.

I hope that this change allows you, the developer, to offer a seamless WYSIWYG environment in Google Docs and make it easier to collaborate with reporters and others who aren't familiar with a specific format for rich text like markdown. You can check out the parsing logic here and make PRs if there's a type of block you think should be supported!