Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > EditableText web part renders <br /> View modes: 
User avatar
Member
Member
Paul T - 1/7/2011 8:11:19 AM
   
EditableText web part renders <br />
Hi,
I'm using an editabletext web part and have entered content via the properties editor - the content is being shown in the Content default text but when the page is rendered all I see is a <br /> tag in the markup. Seems like it should work. What am I doing wrong?
Thanks,
Paul

User avatar
Kentico Support
Kentico Support
kentico_radekm - 1/10/2011 1:36:36 AM
   
RE:EditableText web part renders <br />
Hello.

This issue is caused by browser, which inserts some its own value if the editable region is empty when save it.

This value differ according to browser:

IE : empty
FF : <br />
Chrome :  

You can check that IE or FF adding different values.

Therefore, there is no setting in Kentico CMS which could influence this. You would need handle it in source code, in FCKEditor.cs class, ResolvedValue property´s definition.

You can e.g. change it for example like this:

public string ResolvedValue
{
get
{
string value = HTMLHelper.UnResolveUrls(this.Value, null);
if (FixXHTML)
{
value = HTMLHelper.AddSelfClose(value);
value = HTMLHelper.FixJavaScript(value);
value = HTMLHelper.FixUrl(value);

value = HTMLHelper.LowerCaseTags(value);
}

if (value.ToLower() == "&nbsp")
{
value = String.Empty;
}
return value;
}
set
{
this.Value = HTMLHelper.ResolveUrls(value, null);
}
}


You can also see google and read more about it, so you can see this is a bug related to FCKEditor: www.google.cz/#hl=en&q=bug+fckeditor+br+%26nbsp+empty+text&aq=f&aqi=&aql=&oq=&gs_rfai=&fp=8be3f3b228a82c7b

Anyway, we plan change of editor from FCKEditor to CKEditor within version 6.

I believe this bug will be fixed there (ckeditor.com/whatsnew/all)

Best Regards,
Radek Macalik