File url click support in Markdown and FlavoredMarkdown components
Theming for code-editor web component
What's included?
Add an input property called fileLinkExtensions and an output event called fileClicked in Markdown and FlavoredMarkdown components.
For all the links which end with the provided file extensions the default click behavior will be prevented and an output event will be emitted. Consumers can capture this event and handle the click logic.
When the hostedUrl property is set, this will be prepended to all file links.
Theming for code-editor web component. Note: We might need to create custom themes for supported languages.
Test Steps
[x] npm run start
[x] Run the docs app
[x] Open Markdown or FlavoredMarkdown component demos and pass the hostedURL and fileLinkExtensions properties. Add links which end with these extensions in the markdown content and verify the click action.
General Tests for Every PR
[ ] npm run start still works.
[ ] npm run lint passes.
[ ] npm run stylelint passes.
[ ] npm test passes and code coverage is not lower.
Description
Markdown
andFlavoredMarkdown
componentsWhat's included?
fileLinkExtensions
and an output event calledfileClicked
inMarkdown
andFlavoredMarkdown
components.hostedUrl
property is set, this will be prepended to all file links.Test Steps
npm run start
Markdown
orFlavoredMarkdown
component demos and pass thehostedURL
andfileLinkExtensions
properties. Add links which end with these extensions in the markdown content and verify the click action.General Tests for Every PR
npm run start
still works.npm run lint
passes.npm run stylelint
passes.npm test
passes and code coverage is not lower.npm run build
still works.Screenshots or link to StackBlitz/Plunker
File links![filelinks](https://github.com/user-attachments/assets/f77cb583-6e9d-4175-98d4-e3ba4a337b84)
Code-editor