When using Mozilla Firefox browser, while switching Design-Html tabs, the Rich Text Editor (RTE) might add the following unwanted tag at the end of HTML-markup in the Content Editor or Experience Editor:
<br class="t-last-br" />
To resolve this issue, consider one of the following options:
function OnClientLoad(editor) {with
cEditor = editor; //store editor reference to be used in resize handler
editor.attachEventHandler("mouseup", function() {
var element = editor.getSelection().getParentElement();
if (element && element.tagName && element.tagName.toUpperCase() === "IMG") {
fixImageParameters(element, prefixes.split("|"));
}
});
function OnClientLoad(editor) {
cEditor = editor; //store editor reference to be used in resize handler
editor.attachEventHandler("mouseup", function() {
var element = editor.getSelection().getParentElement();
if (element && element.tagName && element.tagName.toUpperCase() === "IMG") {
fixImageParameters(element, prefixes.split("|"));
}
});
//fix for issue 306662
var customFilter = new RadEditorCustomFilter();
editor.get_filtersManager().add(customFilter);
//end of fix for issue 306662
// the rest of the code does not change
/* This file is shared between older developer center rich text editor and the new EditorPage, that is used exclusively by Content Editor */
//fix for issue 306662
function RadEditorCustomFilter() {
RadEditorCustomFilter.initializeBase(this);
this.set_isDom(false);
this.set_enabled(true);
this.set_name("RadEditor filter");
this.set_description("RadEditor filter description");
}
RadEditorCustomFilter.prototype =
{
getHtmlContent: function (content) {
if (Telerik.Web.Browser.ff) {
content = content.replace('<br class="t-last-br" />\n', '');
}
return content;
}
}
RadEditorCustomFilter.registerClass('RadEditorCustomFilter', Telerik.Web.UI.Editor.Filter);
//end of fix for issue 306662