When Editor becomes an iframe, relative path content is not displayed correctly

[ad_1]

The editor canvas becomes an iframe (blob) under certain conditions, but there is a tag I would like to see added to the embedded html generated when this happens.

In my environment, when adding images to an article, I sometimes use relative URLs instead of absolute URLs.
In that case, the image in the iframe cannot be previewed.

To solve this problem, you need to add a base tag to the header part of the html in the iframe.

Here is an example

<iframe>
<head>
...
  <base href="https://projectdmc.org/support/topic/when-editor-becomes-an-iframe-relative-path-content-is-not-displayed-correctly/{WP_HOME_URL}" />
</head>
<body>
...

</iframe>

Please consider this.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer