Markdown Web Viewers

It certainly would be interesting to know if more information is consumed via plain text in email, text messaging and e-books like PDFs and Kindle or via HTML on the web.

Of course, the format for the information doesn't matter as much as the content, but it sure is nice to be able to easily support a plain text format which easily integrates with the web's ubiquitous HTML. This is why Markdown was created.

Markdown, if you don't already know about, and use it, is a markup format which allows for converting plain text, which can still be read as plain text, into valid HTML.

Using it to compose content within a database, which may have anything to do with the web or even HTML emails, is just plain good sense.

The fact that integrating Markdown, within FileMaker, is so absolutely simple means you should start using it right away! In this video tutorial, I provide all the code and insight necessary to implement and use Markdown within any FileMaker database where you wish to have it. Markdown FTW!

AttachmentSize
MarkdownWebViewers.zip307.67 KB

Comments

I yesterday implemented your previous markdown method!

This is much tidier, thanks

in the Text entry produces

is the substitution of bullets not being reversed?

They are replaced within the receiving script.

-- Matt Petrowsky - ISO FileMaker Magazine Editor

The result I posted was from the demo file. The bullets are encoded, so not being replaced within the receiving script

I get

href=%u2022%u2022http

rather than

href="http

Perhaps another substitute is required

Substitute ( Get ( ScriptParameter ) ; [ "••" ; "\"" ] ; [ "%u2022%u2022" ; "\"" ] )

Thanks

Anything which is "escaped" (in other words converted) when passing through an interpreter, such as javascript, php or FileMaker, just needs to be converted back. If your bullets are being encoded as html entities then you just need to convert them back.

-- Matt Petrowsky - ISO FileMaker Magazine Editor

I thought you might like to include the substitution for (the encoded double bullet) double quotes as they are going to be quite common.

Excellent utility for fm driven web sites. I just finished a site rebuild using Tim Dietrich's excellent FMWebFrame.com and Markdown just adds to the sweetness.

Thank you.

you look at asciidoctor??

john

I'm sure there are many other markup languages. I just took one of the most popular. :)

-- Matt Petrowsky - ISO FileMaker Magazine Editor

Have you planned a follow up showing how to implement the plug-ins of MarkDown-It: footnotes, superscript, subscript etc.?
What about filling the JavaScript as Custom Functions for easy copying and pasting in another solutions?
Thank you for your efforts!

Is the FileMaker calc dialog box only takes something like 10,000 characters. Many times, this is not enough for a full JS library.

With regards to the plugins for markdown-it, I'm going to have to leave that up to those who wish to investigate. I'm sure its within the docs for the library.

-- Matt Petrowsky - ISO FileMaker Magazine Editor

Is there a way to create an HTML email without using an email plugin like 360Works Mail?

In order to send multipart email (an HTML email) you'll need to use some type of plugin. Otherwise, you'll need to find an OS native way of send and do it server side.

-- Matt Petrowsky - ISO FileMaker Magazine Editor

When I try to save to HTML, I get a pop up message that says, "The file "Markdown Web Viewers. fmp12" could not be opened. Either the host is not available, or the file is not available on that host." :/

I had two versions of FMP on my computer and the old one was still handling fmp.

Hi Matt,

Many thanks for this video! My question is more javascript related: when using special characters ( for example é, ß, à, …) the script returns a "?" in the html. Any idea how to support (may be enable support) of non-ascii characters in the javascript?

All the best, Guy