HTML Editor field -> Preview missing CSS classes

Hi! I noticed that the Style/CSS on the HTML Editor field gets completely ignored when previewing.

Is there any way to make the page inherit the css classes from the editor?

Thanks!

I’m guessing it has something to do with frappe/public/js/frappe/dom.js

remove_script_and_style: function (txt) {
	const evil_tags = ["script", "style", "noscript", "title", "meta", "base", "head"];
	const parser = new DOMParser();
	const doc = parser.parseFromString(txt, "text/html");
	const body = doc.body;
	let found = !!doc.head.innerHTML;

	for (const tag of evil_tags) {
		for (const element of body.getElementsByTagName(tag)) {
			found = true;
			element.parentNode.removeChild(element);
		}
	}

	for (const element of body.getElementsByTagName("link")) {
		const relation = element.getAttribute("rel");
		if (relation && relation.toLowerCase().trim() === "stylesheet") {
			found = true;
			element.parentNode.removeChild(element);
		}
	}

Wondering if working around this would cause instabilities in the system