0

I have this code in the field_data_body table in Drupal 7 in the database:

<div itemprop="image" itemscope itemtype="https://schema.org/ImageObject" class="ioc" style="width: 276px; margin-right: 272px;">
 <img alt="alt" src="http://sitename.com/images/picture01/art-cinema1.jpg" title="title" />
 <meta itemprop="url" content="http://sitename.com/images/picture01/art-cinema1.jpg" />
 <meta itemprop="width" content="252" />
 <meta itemprop="height" content="190" />
</div>

But when I edit the content I have just this code in the body field:

<div class="ioc" style="width: 276px; margin-right: 272px;">
       <img alt="alt" src="http://sitename.com/images/picture01/art-cinema1.jpg" title="title" />
</div>

When I copy the code from database and paste it again into the editor, it shows the correct form of code but when I click the source key in CKEditor the code will change to the short form again.

In addition, when I save the content and use inspect element of Chrome browser it shows me the complete form of the code!!

So the problem is just the edit node page which just shows me a short form of code and removes all the meta tags!! How can I fix this problem?

0

Please add following code in Ckeditor Javascript Settings,

config.allowedContent = true

Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.