Page 1 of 1

CSS appears by magic in Markdown Browser-Preview

Posted: 14 Sep 2026 05:05
by ScrKiddle
When creating a Markdown file, the preview in RJ TextEd shows the Markdown-file converted to HTML.
RJ TextEd creates some CSS-stuff in the preview file.

Code: Select all

<!DOCTYPE html>
<html>
<head>
<link rel = "stylesheet" type = "text/css" href = "C:\Users\User\AppData\Roaming\RJ TextEd\Data\markdown.css" />
<link rel="stylesheet" href="C:\Users\User\AppData\Roaming\RJ TextEd\Data\highlight\styles\kimbie-dark.min.css">
<script src="C:\Users\User\AppData\Roaming\RJ TextEd\Data\highlight\highlight.min.js"></script>
<script>hljs.highlightAll();</script>
<title>Preview</title>
<meta http-equiv="Content-Type" content="text/html; charset="utf-8" />
</head>

<body>
...
Users or Autors can apply theyr own CSS styles in markdown, inline or external https://www.markdownlang.com/advanced/css.html .
Styling Markdown with CSS
While Markdown provides semantic structure, CSS allows you to control the visual presentation of your content.
[...]
Markdown is converted to HTML, which can then be styled with CSS.
[...]
Inline Styles
Include CSS directly in your Markdown:

Code: Select all

<style>
h1 {
  color: #2c3e50;
  border-bottom: 2px solid #3498db;
}

p {
  line-height: 1.6;
  color: #34495e;
}
</style>

# Styled Heading

This paragraph will use the custom styles above.
External Stylesheets
Link to external CSS files:

Code: Select all

<link rel="stylesheet" href="styles.css">

# My Document

Content here will use external styles.
When i click the preview button in RJ TextEd to preview the file in a web-browser like brave where a markdown-viewer extension as https://chromewebstore.google.com/detai ... kaikojcbjk or https://chromewebstore.google.com/detai ... ippjlfkmkg or any https://chromewebstore.google.com/searc ... n%20viewer is installed, there happens a conflict with the CSS-styles.
The conflict does not appear when the original markdown-file gets directly opened in the browser, because there is no "hidden" RJ TextEd CSS-Stuff in it.

Some how, my guess, RJ TextEd should respect custom inline-CSS in Markdown files, at least in the browser preview.
The preview in the Editor it self is one thing, but when "exported" to the browser, or what ever preview app is given in the RJ TextEd-Settings (it could be any thing, may a markdown editor or viewer) the preview file should be as it is, without magic RJ TextEd CSS and HTML-Tricks.

Actually the only way around this "witch-craft" is to save the original file and then to open the original Markdown file in the browser with a file:///C:/somewhere/original.md link, instead of using the preview in browser button given in RJ TextEd.

May in the Settings there should be an option to use the RJ TextEd CSS-magic or just the pure Markdown-file as is in Browser-Preview.