I'm trying to work on a way to load CSS path with in the DNN CK Editor v4.18.0 preview mode, here are some images below.

Now the using the Custom Editor Options I've been able to use a common.css file which has all the css files path embedded in it as only one css can be used.
Now When it comes to Preview Mode.
This happens below.

Now I tried certain things which I thought would work out first I create a cust_config.js inside the /Portal/1/xyz/cust_config.js which contains this code.
// CKEDITOR.editorConfig = function (config) {
// config.contentsCss = [
// '/Portals/1/xyz/css/common.css'
// ];
// config.allowedContent = true; // Ensures styles aren't blocked
// };
CKEDITOR.editorConfig = function (config) {
config.extraPlugins = 'wysiwygarea'; // Ensure iframe editor is used
config.contentsCss = []; // Keep contentsCss empty to prevent overrides
CKEDITOR.on('instanceReady', function (ev) {
var editor = ev.editor;
var iframe = editor.container.$.querySelector('iframe.cke_wysiwyg_frame');
if (iframe) {
var head = iframe.contentWindow.document.head;
var link = iframe.contentWindow.document.createElement('link');
link.rel = 'stylesheet';
link.href = '/Portals/1/xyz/css/common.css';
head.appendChild(link);
}
});
};
As this file is used in the Custom Editor Options > Main Settings > Configuration > Custom Config file it does run the alert but when trying to add common.css there it does not load at all when i use the edit module button, so I had to use the manual way to add common.css in the Custom Editor Options which would at least show the Edit options working but Preview fails in all way.