Markdown ultra-lite

Trevor DeVore lists at mangomultimedia.com
Mon Nov 6 10:20:03 EST 2017


On Sun, Nov 5, 2017 at 2:40 PM, Kay C Lan via use-livecode <
use-livecode at lists.runrev.com> wrote:

> Nor was I aware that mergMardownToXHMTL existed, so thank you for
> raising this thread so James could enlighten us. Now all I need is
> someone to tell me there is similar function that converts HTML (or
> more specifically the LC subset of HTML used by Fields) to Markdown
> otherwise I too will be reading more about Markdown (thanks for the
> link) and learning something new.


Here is some old code I used in the past which was modified from some other
converted I had written for Textile and BBCode. If I were writing the
converter today I would use the styledText array to do it. It is great for
converting to other formats.

https://gist.github.com/trevordevore/5eaa7333841d15f5bbbde490636dc143

Usage:

`put htmlTextToMarkdown(htmltext of fld 1)`

-- 
Trevor DeVore
ScreenSteps
www.screensteps.com



More information about the use-livecode mailing list