On Sun, Nov 5, 2017 at 2:40 PM, Kay C Lan via use-livecode <
use-livecode@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
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to