Skip to content
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

Missing support for relative reference link and svg image in MarkdownTextBlock #1594

Closed
ilinkmobility opened this issue Nov 6, 2017 · 4 comments
Labels
controls 🎛️ help wanted Issues identified as good community contribution opportunities improvements ✨

Comments

@ilinkmobility
Copy link

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Feature request <!-- Please file a UserVoice request and include the link below https://wpdev.uservoice.com/forums/110705-universal-windows-platform/category/193402-uwp-community-toolkit -->
[ ] Sample app request
[ ] Documentation issue or request
[ ] Question of Support request => Please do not submit support request here, instead see https://github.com/Microsoft/UWPCommunityToolkit/blob/master/contributing.md#question

UserVoice link

Current behavior

  1. Missing support for relative reference within same reference group. Its not generate the hyperlink link.
    Eg : [Refer relative reference](../home/relative.md)

  2. SVG images are not loaded in Image
    Eg : ![Toolkit logo](https://image.flaticon.com/icons/svg/178/178156.svg)

md-issue

Expected behavior

Minimal reproduction of the problem with instructions

Environment

Nuget Package(s): 

Package Version(s): 

Windows 10 Build Number:
- [ ] Anniversary Update (14393) 
- [ ] Creators Update (15063)
- [ ] Fall Creators Update (16299)
- [ ] Insider Build (xxxxx)

App min and target version:
- [ ] Anniversary Update (14393) 
- [ ] Creators Update (15063)
- [ ] Fall Creators Update (16299)
- [ ] Insider Build (xxxxx)

Device form factor:
- [x] Desktop
- [ ] Mobile
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT

Visual Studio 
- [ ] 2017 15.3
- [x] 2017 15.4

@nmetulev nmetulev added controls 🎛️ help wanted Issues identified as good community contribution opportunities improvements ✨ labels Nov 6, 2017
@nmetulev
Copy link
Contributor

nmetulev commented Nov 6, 2017

Thanks for submitting the issue, these both sound like great improvements. Feel free to submit a Pull Request to add these.

@ivan-stp
Copy link
Contributor

@ilinkmobility For .svg image you can use SvgImageSource in ImageResolving event handler.

E.g.

private void MarkdownTextblock_ImageResolving(object sender, ImageResolvingEventArgs e)
{
    if (e.Url.EndsWith(".svg"))
    {
        e.Image = new SvgImageSource(new Uri(e.Url));
        e.Handled = true;
    }
}

@ilinkmobility
Copy link
Author

@krt, thank you.
I have tried that, its working with Creator update (v10.0.15063.0) and above. I hope for now MD tags are not supporting to specify image dimensions. The problem with SVG is its occupy entire screen. It would be better if it support to add dimension along with image links.

@ivan-stp
Copy link
Contributor

ivan-stp commented Nov 20, 2017

@ilinkmobility It will be supported when #1634 is merged

@ghost ghost locked as resolved and limited conversation to collaborators Nov 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
controls 🎛️ help wanted Issues identified as good community contribution opportunities improvements ✨
Projects
None yet
Development

No branches or pull requests

3 participants