extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
Doze, you pretty much have it right on the money. However, rather than using the valid_elements config setting, I think the extended_valid_elements config setting should be used instead. If you look at the plugin code, you’ll see a line like this:
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
It’s pretty easy to figure out what’s what on this line. To add support for the "rel" attribute for "a" tags, you could simply add in the "rel" attribute to the the part of the line dealing with anchor tags (a[name|href|target|title|onclick|rel]). Just modify the code like that and you should be set.
Probably what I’ll do for the next revision is add in the valid_elements config setting to where just about every valid element in the XHTML specification is covered. That way we won’t have a bunch of elements constantly being replaced on users.
More to come....
Jeff
$fullScript = <<<FULL_SCRIPT
<script language="javascript" type="text/javascript" src="{$base_url}assets/plugins/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
theme : "advanced",
mode : "exact",
relative_urls : {$relative_urls}, {$document_base_url}
remove_script_host : {$remove_script_host},
language : "{$tinymce_language}",
nowrap : false,
object_resizing : false,
fix_content_duplication : true,
force_p_newlines : false,
force_br_newlines : false,
remove_linebreaks : false,
apply_source_formatting : false,
fix_list_elements : true,
$elmList
$webWidth
$webHeight
plugins : "style,layer,table,advhr,advimage,advlink,insertdatetime,preview,flash,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable",
theme_advanced_buttons1_add_before : "separator,save,newdocument,separator",
theme_advanced_buttons1_add : "",
theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor",
theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator,pastetext,pasteword,selectall,separator",
theme_advanced_buttons3_add_before: "tablecontrols,separator",
theme_advanced_buttons3_add : "iespell,flash,advhr,separator,print,separator,ltr,rtl,separator,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops",
theme_advanced_toolbar_location : "bottom",
theme_advanced_toolbar_align : "left",
theme_advanced_path_location : "top",
theme_advanced_source_editor_width : "768",
theme_advanced_source_editor_height : "576",
theme_advanced_source_editor_wrap : true,
plugin_insertdate_dateFormat : "%Y-%m-%d",
plugin_insertdate_timeFormat : "%H:%M:%S",
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
$cssPath
$cssSelector
onchange_callback : "tvOnTinyMCEChangeCallBack",
resource_browser_path : "{$base_url}manager/media/browser/mcpuk/browser.html?Connector={$base_url}manager/media/browser/mcpuk/connectors/php/connector.php&ServerPath={$base_url}",
$fileBrowserCallback
});<script language="javascript" type="text/javascript" src="/assets/plugins/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
theme : "advanced",
mode : "exact",
relative_urls : true,
document_base_url : "/",
remove_script_host : true,
language : "en",
elements : "ta,tvhi_sidebar",
plugins : "style,layer,table,advhr,advimage,advlink,emotions,insertdatetime,preview,flash,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable",
theme_advanced_buttons1_add_before : "save,newdocument,separator",
theme_advanced_buttons1_add : "fontselect,fontsizeselect",
theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor",
theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator,pastetext,pasteword,selectall,separator",
theme_advanced_buttons3_add_before: "tablecontrols,separator",
theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print,separator,ltr,rtl,separator,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_path_location : "bottom",
plugin_insertdate_dateFormat : "%Y-%m-%d",
plugin_insertdate_timeFormat : "%H:%M:%S",
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
preformatted : true,
onchange_callback : "tvOnTinyMCEChangeCallBack",
resource_browser_path : "/manager/media/browser/mcpuk/browser.html?Connector=/manager/media/browser/mcpuk/connectors/php/connector.php&ServerPath=/",
file_browser_callback : "fileBrowserCallBack"
});
function fileBrowserCallBack(field_name, url, type, win) {
// This is where you insert your custom filebrowser logic
var win=tinyMCE.getWindowArg("window");
win.BrowseServer(field_name);
}
function tvOnTinyMCEChangeCallBack(i){
i.oldTargetElement.onchange();
}
</script>