Mozilla Firefoxを使用している場合、Design-Htmlタブを切り替えると、リッチ テキスト エディタ(RTE)がコンテンツ エディターまたはエクスペリエンス エディターのHTMLマークアップの末尾に、以下の不要なタグを追加する場合があります。
<br class="t-last-br" />
この問題を解決するには、以下のいずれかの方法をご検討ください。
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("|"));
}
});
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