-
Notifications
You must be signed in to change notification settings - Fork 560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JavaScript library does not natively support markdown, and third-party libs are too permissive #910
Comments
Inline images also work via markdown: {
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"type": "TextBlock",
"text": "![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png \"Logo Title Text 1\")"
}
]
} renders as |
This one is interesting:
So, how can we address this? |
For .NET we forked a library and customized it. For the iOS/Android/UWP we are working through options, including writing a shared parser/implementation in our C++ layer. There are plenty of references out there, it seems like rolling our own given the very limited set of markdown options might be the best way to go? |
we've found implementing markdown subset is not easy work 😫 I think adaptivecards is expressive enough even without markdown support
on the other hand, i hope auto linebreak and inline text emphasis feature since these are most wanted features by our developers. |
@andrewleader / @matthidinger / @paulcam206/ @dclaux is this addressed with 1.2 changes all up across all platforms? What should be the expected behavior wrt markdown in textblocks and richtextblocks resp with 1.2? |
No, this isn't addressed, but it's something we need to do. This inconsistent behavior leads to confusion. Users expect that what you see in the designer is what you get everywhere else. |
Problem is we may not be able to control it unless we provide a built-in Markdown processor. We don't load markdown-it, and I'm not sure we can reconfigure it after it's been loaded by the host application. Plus, using Markdown-it isn't a requirement. |
I'll table this in that case for 1.3 addressing. @andrewleader what are teh next steps here for this to result in a Markdown-related requierments spec for 1.3 ? THanks! |
Working with @andrewleader to create a "parent" "Markdown support in TextBox" task/issue for 1.3 |
@dclaux FYI likely moving this to 1.3 (adding a checkbox that lets textbox element have the option to "opt-out" of markdown |
FYI the ReactNative team did in fact implement their own markdown processor. @Vasanth-S can provide details. Ideally we could use the same or similar code in the plain JS renderer to bundle official AC markdown support in the renderer |
@Vasanth-S / @matthidinger This is the markdown parser we are using for our react-native implementation. Currently, it supports the below 5 types:
You can refer the same to support web-based markdown processor. In case, if you need any help, we are happy to work on that. |
No immediate requirement to do this at this point. Chatted with @dclaux ; moving this out to our backlog to revisit. |
Tracked by #1984 |
This sample has a lot of markdown syntax that shouldn't be supported according to the docs.
Renders as:
The text was updated successfully, but these errors were encountered: