HTML editor

Forum to discuss the Web client version of Servoy.

HTML editor

Postby jdbruijn » Wed Jun 11, 2014 4:53 pm

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 (<html><head>...</head><body>...</body></html>)
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?
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm

Re: HTML editor

Postby jdbruijn » Thu Jun 12, 2014 9:49 am

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.
Code: Select all
<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:
Code: Select all
<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?
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm

Re: HTML editor

Postby Harjo » Thu Jun 12, 2014 10:09 am

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
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands


Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 11 guests