Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Static HTML losing html View modes: 
User avatar
Member
Member
16vMonkey - 8/7/2012 3:58:03 AM
   
Static HTML losing html
Scratching my head on this one. When i paste some HTML into a static HTML webpart as plain text, when saved it removes some of the HTML tags. Heres an example....

<div class="sets">
<div>
<a href="details.html"><img alt="Temp Image" src="~/App_Themes/Bonds/images/products/Bonds-0010.jpg" /> </a>
<h3>
<a href="details.html"><b>New Sweets</b> <span>£ 3.99</span> </a></h3>
<form>
<a href="details.html"><input maxlength="2" name="" type="text" /><input name="" type="submit" value="Add" /> </a></form>
</div>
<div>
<a href="details.html"><img alt="Temp Image" src="~/App_Themes/Bonds/images/products/Bonds-0009.jpg" /> </a>
<h3>
<a href="details.html"><b>New Sweets</b> <span>£ 3.99</span> </a></h3>
<form>
<a href="details.html"><input maxlength="2" name="" type="text" /><input name="" type="submit" value="Add" /> </a></form>
</div>
<div>
<a href="details.html"><img alt="Temp Image" src="~/App_Themes/Bonds/images/products/Bonds-0008.jpg" /> </a>
<h3>
<a href="details.html"><b>New Sweets</b> <span>£ 3.99</span> </a></h3>
<form>
<a href="details.html"><input maxlength="2" name="" type="text" /><input name="" type="submit" value="Add" /> </a></form>
</div>
</div>
<!-- SETS --></div>
<a href="#" id="next2"></a>
<a href="#" id="prev2"></a>


When pasted and saved, it removes the two <a href> tags after the last </div>

cant fathom why!

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 8/7/2012 6:32:47 AM
   
RE:Static HTML losing html
Hello,

Could you please let me know which version of Kentico are you using and which hotfix is applied?

Best regards,
Boris Pocatko

User avatar
Member
Member
16vMonkey - 8/7/2012 6:42:35 AM
   
RE:Static HTML losing html
i'm using v6.0.38 SP1

Mike.

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 8/8/2012 7:42:12 AM
   
RE:Static HTML losing html
Hello,

Thank you for the details. I was able to reproduce the issue. This seems to be a bug. I submitted the issue and I will let you know if it gets confirmed by our testers and developer. I am sorry for the inconvenience.

UPDATE: This fix will be released in the hotfix package number 47.
UPDATE2: Regrettably, this is a bug/designed behavior in the CKEditor, so we are not able to fix it. You will need to direct this complaint to the developers of the CKEditor directly.

Best regards,
Boris Pocatko

User avatar
Member
Member
16vMonkey - 8/8/2012 8:02:51 AM
   
RE:Static HTML losing html
not a problem, glad I could assist.

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 8/8/2012 11:36:49 AM
   
RE:Static HTML losing html
When i paste some HTML into a static HTML webpart as plain text

Are you clicking the Source button on the WYSIWYG editor and pasting, is that what you mean by plain text? If I have any kind of HTML I always paste it in Source mode and don't seem to have any issues.

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 8/9/2012 5:26:51 AM
   
RE:Static HTML losing html
Hello,

This issue was reproduced with pasting the HTML code in the Source button mode. But thank you for clarification for future readers.

Best regards,
Boris Pocatko

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 8/9/2012 9:56:15 AM
   
RE:Static HTML losing html
This is just a tip:

If you want to avoid all of the filters and things done by the CKEditor when placing static HTML, use the Static Text web part instead.

User avatar
Member
Member
nanite2000 - 3/27/2013 5:48:54 PM
   
RE:Static HTML losing html
Jiveabillion wrote: This is just a tip:

If you want to avoid all of the filters and things done by the CKEditor when placing static HTML, use the Static Text web part instead.

How can we get around this issue when the CKEditor is part of the Kentico System Settings (e.g. Forms/Fields layout for document types and system tables)?

User avatar
Kentico Consulting
Kentico Consulting
richards@kentico.com - 3/28/2013 8:09:33 AM
   
RE:Static HTML losing html
Hi,

it depends on what exactly is Ckeditor stripping for you -> There may be some workaround. Unfortunately this part is kind of outside Kentico's influence.

However if I stick to the poster first question I can see that the ckeditor was stripping an empty tags -> unfortunately this is just what ckeditor does. To solve his issue would be to use:

<a href="#" id="next2"> </a>


Note: the blank spot is "& amp"; without the space

instead of

<a href="#" id="next2"></a>


Let me know what your issue is exactly so I can try to search for it.

Kind regards,
Richard Sustek

User avatar
Member
Member
nanite2000 - 4/1/2013 2:59:35 PM
   
RE:Static HTML losing html
richards@kentico.com wrote:
Let me know what your issue is exactly so I can try to search for it.

Kind regards,
Richard Sustek

My specific issue was that I had a HTML template that had a <div> contained within an <a>. Strictly speaking, by W3C standards, that isn't allowed. However, all browsers render it OK, and it's not strictly enforced.

CKEditor, on the other hand, changed my source to make it compliant. This was on a website that was previously on v5.5 R2, and we'd just upgraded it, but none of our source code or stylesheets had been updated. So every time an editor went in to change a template, the resulting page looked a mess because the template no longer matched the structure the stylesheet was attempting to apply.

And there was no way around it. We had to re-do every page that used the same stylesheet reference, and change the CSS itself.

Considering how much Kentico licenses cost, I'm guessing Kentico is a pretty big client/customer of CKEditor. You say this issue is beyond your control, but it isn't. You *could* use your influential position to encourage CKEditor to add a 'do not change source code' option to their product.

I don't think it's right for Kentico to send their customers/clients to one of your own providers to force a change request. As the vendor, I believe it is your responsibility to manage business relationships with your own providers.