vscode-markdown-editor
vscode-markdown-editor copied to clipboard
feat: add external CSS files support for markdown editor
- Added externalCssFiles configuration to load external CSS files from URLs or local paths
- Added cssLoadOrder configuration to control CSS loading priority
- Implemented intelligent path resolution for relative/absolute paths
- Added configuration change listener for hot reload
- Enhanced HTML generation to include external CSS links
- Added support for HTTP/HTTPS URLs with CORS handling
- Maintained backward compatibility with existing customCss feature
Features:
- Load CSS from HTTP/HTTPS URLs
- Load CSS from local file paths (absolute and relative)
- Smart path resolution relative to markdown file or workspace
- Hot reload when configuration changes
- Error handling and logging
- Configurable CSS loading order
Examples:
- Network CSS: https://cdn.jsdelivr.net/npm/[email protected]/github-markdown.css
- Local CSS: ./styles/theme.css, /absolute/path/style.css
- Multiple files support with priority control