Issue #1173Opened June 6, 2018by UmairAfzalUAT0 reactions

Head tag data displaying in body and head is showing empty

Question

Hi Artf there is head tag and meta tags in my head tag of HTML i am assigning to editor components. Like

<!DOCTYPE html>
<html lang="en">
<head>
   <base id="base" href="http://127.0.0.1:8000/storage/projects/1/c8FRWF5tjAYqNralxABnigDX7qCUSR1KhnRK/">
<meta charset="utf-8">
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
</head>
<body>
........
</body>
</html>

But it is displaying <head> content in body of iframe like

<iframe allowfullscreen="allowfullscreen" class="gjs-frame">
<html>
<head></head>
<body class="gjs-dashed">
<style>....</style>
<div id="wrapper" data-highlightable="1">
<base id="base" href="http://127.0.0.1:8000/storage/projects/1/c8FRWF5tjAYqNralxABnigDX7qCUSR1KhnRK/" data-highlightable="1">
<meta charset="utf-8" data-highlightable="1">
<meta http-equiv="X-UA-Compatible" content="IE=edge" data-highlightable="1">
<meta name="viewport" content="width=device-width, initial-scale=1" data-highlightable="1">
<meta name="description" content="" data-highlightable="1">
<meta name="author" content="" data-highlightable="1">Other Content </div>
</body>
</html>
</iframe>

Answers (2)

artfJune 8, 20180 reactions

GrapesJS is not designed to handle stuff outside of the body, indeed all the content are appended inside the body. So, for example, if you're creating a Page Builder you use GrapesJS for creating the template of the page NOT its metadata, that part should be handled outside

lock[bot]September 17, 20190 reactions

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.