Skip to content

Commit

Permalink
Update example to use onProcessMarkdown
Browse files Browse the repository at this point in the history
- instead of the deprecated processMarkdown
  • Loading branch information
Flexicon committed Oct 30, 2020
1 parent db2c078 commit 09d4fdf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions AdaptiveCards/sdk/rendering-cards/javascript/render-a-card.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Render a card - JavaScript SDK
author: matthidinger
ms.author: mahiding
ms.date: 11/28/2017
ms.date: 08/30/2020
ms.topic: article
---

Expand Down Expand Up @@ -76,7 +76,10 @@ adaptiveCard.onExecuteAction = function(action) { alert("Ow!"); }
// E.g., to use markdown-it, include in your HTML page:
// <script type="text/javascript" src="https://unpkg.com/markdown-it/dist/markdown-it.js"></script>
// And add this code to replace the default markdown handler:
// AdaptiveCards.processMarkdown = function(text) { return markdownit().render(text); }
// AdaptiveCards.AdaptiveCard.onProcessMarkdown = function (text, result) {
// result.outputHtml = markdownit().render(text);
// result.didProcess = true;
// };

// Parse the card payload
adaptiveCard.parse(card);
Expand Down

0 comments on commit 09d4fdf

Please sign in to comment.