I’m using a HTML area in the webclient to edit an email template.
The template has been made by a webdesigner and it has a normal html structure (……)
After pasting it in the html-editor (as html source) and editing it inside the editor it seems to only store the data that is between the body tags. All the rest is removed and since the head contains style information to make the template responsive we always lose this style information.
Is this normal for the html editor? Or is this a setting that needs to be set on the editor to keep the html structure intact?
Ok, so I found out that I need an extra plugin for this: the fullpage plugin.
after adding this plugin I can add an extra button to my toolbar for the document properties.
Using this button I can set the Title for the page, and this is shown in the html source correctly.
<html>
<head>
<title>Test titel</title>
</head>
<body>
But as soon as I switch to a different record (to save to the db) and switch back to the first record the html source is wrong:
<html><body>
<p>Test titel</p>
Is there something else I need to set in the editor for this to work? Or is this a bug?
Most html editors (like tinyMCE and many others… etc.) are build to strip this kind of info.
So look into the documentation of the html editor you use!
what we do is that we edit ONLY the content, (between the body) and always add the whole html header & css stuff, by servoy code, after saving