code:
tinyMCEPopup.requireLangPack();

function init() {
	tinyMCEPopup.resizeToInnerSize();

	document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
	document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');

	var inst = tinyMCEPopup.editor;
	var dom = inst.dom;
	var trElm = dom.getParent(inst.selection.getStart(), "tr");
	var formObj = document.forms[0];
	var st = dom.parseStyle(dom.getAttrib(trElm, "style"));

	// Get table row data
	var rowtype = trElm.parentNode.nodeName.toLowerCase();
	var align = dom.getAttrib(trElm, 'align');
	var valign = dom.getAttrib(trElm, 'valign');
	var height = trimSize(getStyle(trElm, 'height', 'height'));
	var className = dom.getAttrib(trElm, 'class');
	var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor'));
	var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
	var id = dom.getAttrib(trElm, 'id');
	var lang = dom.getAttrib(trElm, 'lang');
	var dir = dom.getAttrib(trElm, 'dir');

	selectByValue(formObj, 'rowtype', rowtype);

	// Any cells selected
	if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) {
		// Setup form
		addClassesToList('class', 'table_row_styles');
		TinyMCE_EditableSelects.init();

		formObj.bgcolor.value = bgcolor;
		formObj.backgroundimage.value = backgroundimage;
		formObj.height.value = height;
		formObj.id.value = id;
		formObj.lang.value = lang;
		formObj.style.value = dom.serializeStyle(st);
		selectByValue(formObj, 'align', align);
		selectByValue(formObj, 'valign', valign);
		selectByValue(formObj, 'class', className, true, true);
		selectByValue(formObj, 'dir', dir);

		// Resize some elements
		if (isVisible('backgroundimagebrowser'))
			document.getElementById('backgroundimage').style.width = '180px';

		updateColor('bgcolor_pick', 'bgcolor');
	} else
		tinyMCEPopup.dom.hide('action');
}

function updateAction() {
	var inst = tinyMCEPopup.editor, dom = inst.dom, trElm, tableElm, formObj = document.forms[0];
	var action = getSelectValue(formObj, 'action');

	if (!AutoValidator.validate(formObj)) {
		tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
		return false;
	}

	tinyMCEPopup.restoreSelection();
	trElm = dom.getParent(inst.selection.getStart(), "tr");
	tableElm = dom.getParent(inst.selection.getStart(), "table");

	// Update all selected rows
	if (dom.select('td.mceSelected,th.mceSelected', trElm).length > 0) {
		tinymce.each(tableElm.rows, function(tr) {
			var i;

			for (i = 0; i < tr.cells.length; i++) {
				if (dom.hasClass(tr.cells[i], 'mceSelected')) {
					updateRow(tr, true);
					return;
				}
			}
		});

		inst.addVisual();
		inst.nodeChanged();
		inst.execCommand('mceEndUndoLevel');
		tinyMCEPopup.close();
		return;
	}

	switch (action) {
		case "row":
			updateRow(trElm);
			break;

		case "all":
			var rows = tableElm.getElementsByTagName("tr");

			for (var i=0; i<rows.length; i++)
				updateRow(rows[i], true);

			break;

		case "odd":
		case "even":
			var rows = tableElm.getElementsByTagName("tr");

			for (var i=0; i<rows.length; i++) {
				if ((i % 2 == 0 && action == "odd") || (i % 2 != 0 && action == "even"))
					updateRow(rows[i], true, true);
			}

			break;
	}

	inst.addVisual();
	inst.nodeChanged();
	inst.execCommand('mceEndUndoLevel');
	tinyMCEPopup.close();
}

function updateRow(tr_elm, skip_id, skip_parent) {
	var inst = tinyMCEPopup.editor;
	var formObj = document.forms[0];
	var dom = inst.dom;
	var curRowType = tr_elm.parentNode.nodeName.toLowerCase();
	var rowtype = getSelectValue(formObj, 'rowtype');
	var doc = inst.getDoc();

	// Update row element
	if (!skip_id)
		dom.setAttrib(tr_elm, 'id', formObj.id.value);

	dom.setAttrib(tr_elm, 'align', getSelectValue(formObj, 'align'));
	dom.setAttrib(tr_elm, 'vAlign', getSelectValue(formObj, 'valign'));
	dom.setAttrib(tr_elm, 'lang', formObj.lang.value);
	dom.setAttrib(tr_elm, 'dir', getSelectValue(formObj, 'dir'));
	dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(formObj.style.value)));
	dom.setAttrib(tr_elm, 'class', getSelectValue(formObj, 'class'));

	// Clear deprecated attributes
	dom.setAttrib(tr_elm, 'background', '');
	dom.setAttrib(tr_elm, 'bgColor', '');
	dom.setAttrib(tr_elm, 'height', '');

	// Set styles
	tr_elm.style.height = getCSSSize(formObj.height.value);
	tr_elm.style.backgroundColor = formObj.bgcolor.value;

	if (formObj.backgroundimage.value != "")
		tr_elm.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
	else
		tr_elm.style.backgroundImage = '';

	// Setup new rowtype
	if (curRowType != rowtype && !skip_parent) {
		// first, clone the node we are working on
		var newRow = tr_elm.cloneNode(1);

		// next, find the parent of its new destination (creating it if necessary)
		var theTable = dom.getParent(tr_elm, "table");
		var dest = rowtype;
		var newParent = null;
		for (var i = 0; i < theTable.childNodes.length; i++) {
			if (theTable.childNodes[i].nodeName.toLowerCase() == dest)
				newParent = theTable.childNodes[i];
		}

		if (newParent == null) {
			newParent = doc.createElement(dest);

			if (theTable.firstChild.nodeName == 'CAPTION')
				inst.dom.insertAfter(newParent, theTable.firstChild);
			else
				theTable.insertBefore(newParent, theTable.firstChild);
		}

		// append the row to the new parent
		newParent.appendChild(newRow);

		// remove the original
		tr_elm.parentNode.removeChild(tr_elm);

		// set tr_elm to the new node
		tr_elm = newRow;
	}

	dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(tr_elm.style.cssText)));
}

function changedBackgroundImage() {
	var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
	var st = dom.parseStyle(formObj.style.value);

	st['background-image'] = "url('" + formObj.backgroundimage.value + "')";

	formObj.style.value = dom.serializeStyle(st);
}

function changedStyle() {
	var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
	var st = dom.parseStyle(formObj.style.value);

	if (st['background-image'])
		formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
	else
		formObj.backgroundimage.value = '';

	if (st['height'])
		formObj.height.value = trimSize(st['height']);

	if (st['background-color']) {
		formObj.bgcolor.value = st['background-color'];
		updateColor('bgcolor_pick','bgcolor');
	}
}

function changedSize() {
	var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
	var st = dom.parseStyle(formObj.style.value);

	var height = formObj.height.value;
	if (height != "")
		st['height'] = getCSSSize(height);
	else
		st['height'] = "";

	formObj.style.value = dom.serializeStyle(st);
}

function changedColor() {
	var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
	var st = dom.parseStyle(formObj.style.value);

	st['background-color'] = formObj.bgcolor.value;

	formObj.style.value = dom.serializeStyle(st);
}

tinyMCEPopup.onInit.add(init);


code:
tinyMCEPopup.requireLangPack();

var action, orgTableWidth, orgTableHeight, dom = tinyMCEPopup.editor.dom;

function insertTable() {
	var formObj = document.forms[0];
	var inst = tinyMCEPopup.editor, dom = inst.dom;
	var cols = 2, rows = 2, border = 0, cellpadding = -1, cellspacing = -1, align, width, height, className, caption, frame, rules;
	var html = '', capEl, elm;
	var cellLimit, rowLimit, colLimit;

	tinyMCEPopup.restoreSelection();

	if (!AutoValidator.validate(formObj)) {
		tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
		return false;
	}

	elm = dom.getParent(inst.selection.getNode(), 'table');

	// Get form data
	cols = formObj.elements['cols'].value;
	rows = formObj.elements['rows'].value;
	border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0;
	cellpadding = formObj.elements['cellpadding'].value != "" ? formObj.elements['cellpadding'].value : "";
	cellspacing = formObj.elements['cellspacing'].value != "" ? formObj.elements['cellspacing'].value : "";
	align = getSelectValue(formObj, "align");
	frame = getSelectValue(formObj, "tframe");
	rules = getSelectValue(formObj, "rules");
	width = formObj.elements['width'].value;
	height = formObj.elements['height'].value;
	bordercolor = formObj.elements['bordercolor'].value;
	bgcolor = formObj.elements['bgcolor'].value;
	className = getSelectValue(formObj, "class");
	id = formObj.elements['id'].value;
	summary = formObj.elements['summary'].value;
	style = formObj.elements['style'].value;
	dir = formObj.elements['dir'].value;
	lang = formObj.elements['lang'].value;
	background = formObj.elements['backgroundimage'].value;
	caption = formObj.elements['caption'].checked;

	cellLimit = tinyMCEPopup.getParam('table_cell_limit', false);
	rowLimit = tinyMCEPopup.getParam('table_row_limit', false);
	colLimit = tinyMCEPopup.getParam('table_col_limit', false);

	// Validate table size
	if (colLimit && cols > colLimit) {
		tinyMCEPopup.alert(inst.getLang('table_dlg.col_limit').replace(/\{\$cols\}/g, colLimit));
		return false;
	} else if (rowLimit && rows > rowLimit) {
		tinyMCEPopup.alert(inst.getLang('table_dlg.row_limit').replace(/\{\$rows\}/g, rowLimit));
		return false;
	} else if (cellLimit && cols * rows > cellLimit) {
		tinyMCEPopup.alert(inst.getLang('table_dlg.cell_limit').replace(/\{\$cells\}/g, cellLimit));
		return false;
	}

	// Update table
	if (action == "update") {
		dom.setAttrib(elm, 'cellPadding', cellpadding, true);
		dom.setAttrib(elm, 'cellSpacing', cellspacing, true);
		dom.setAttrib(elm, 'border', border);
		dom.setAttrib(elm, 'align', align);
		dom.setAttrib(elm, 'frame', frame);
		dom.setAttrib(elm, 'rules', rules);
		dom.setAttrib(elm, 'class', className);
		dom.setAttrib(elm, 'style', style);
		dom.setAttrib(elm, 'id', id);
		dom.setAttrib(elm, 'summary', summary);
		dom.setAttrib(elm, 'dir', dir);
		dom.setAttrib(elm, 'lang', lang);

		capEl = inst.dom.select('caption', elm)[0];

		if (capEl && !caption)
			capEl.parentNode.removeChild(capEl);

		if (!capEl && caption) {
			capEl = elm.ownerDocument.createElement('caption');

			if (!tinymce.isIE)
				capEl.innerHTML = '
';

			elm.insertBefore(capEl, elm.firstChild);
		}

		if (width && inst.settings.inline_styles) {
			dom.setStyle(elm, 'width', width);
			dom.setAttrib(elm, 'width', '');
		} else {
			dom.setAttrib(elm, 'width', width, true);
			dom.setStyle(elm, 'width', '');
		}

		// Remove these since they are not valid XHTML
		dom.setAttrib(elm, 'borderColor', '');
		dom.setAttrib(elm, 'bgColor', '');
		dom.setAttrib(elm, 'background', '');

		if (height && inst.settings.inline_styles) {
			dom.setStyle(elm, 'height', height);
			dom.setAttrib(elm, 'height', '');
		} else {
			dom.setAttrib(elm, 'height', height, true);
			dom.setStyle(elm, 'height', '');
 		}

		if (background != '')
			elm.style.backgroundImage = "url('" + background + "')";
		else
			elm.style.backgroundImage = '';

/*		if (tinyMCEPopup.getParam("inline_styles")) {
			if (width != '')
				elm.style.width = getCSSSize(width);
		}*/

		if (bordercolor != "") {
			elm.style.borderColor = bordercolor;
			elm.style.borderStyle = elm.style.borderStyle == "" ? "solid" : elm.style.borderStyle;
			elm.style.borderWidth = border == "" ? "1px" : border;
		} else
			elm.style.borderColor = '';

		elm.style.backgroundColor = bgcolor;
		elm.style.height = getCSSSize(height);

		inst.addVisual();

		// Fix for stange MSIE align bug
		//elm.outerHTML = elm.outerHTML;

		inst.nodeChanged();
		inst.execCommand('mceEndUndoLevel');

		// Repaint if dimensions changed
		if (formObj.width.value != orgTableWidth || formObj.height.value != orgTableHeight)
			inst.execCommand('mceRepaint');

		tinyMCEPopup.close();
		return true;
	}

	// Create new table
	html += '<table';

	html += makeAttrib('id', id);
	html += makeAttrib('border', border);
	html += makeAttrib('cellpadding', cellpadding);
	html += makeAttrib('cellspacing', cellspacing);
	html += makeAttrib('data-mce-new', '1');

	if (width && inst.settings.inline_styles) {
		if (style)
			style += '; ';

		// Force px
		if (/^[0-9\.]+$/.test(width))
			width += 'px';

		style += 'width: ' + width;
	} else
		html += makeAttrib('width', width);

/*	if (height) {
		if (style)
			style += '; ';

		style += 'height: ' + height;
	}*/

	//html += makeAttrib('height', height);
	//html += makeAttrib('bordercolor', bordercolor);
	//html += makeAttrib('bgcolor', bgcolor);
	html += makeAttrib('align', align);
	html += makeAttrib('frame', frame);
	html += makeAttrib('rules', rules);
	html += makeAttrib('class', className);
	html += makeAttrib('style', style);
	html += makeAttrib('summary', summary);
	html += makeAttrib('dir', dir);
	html += makeAttrib('lang', lang);
	html += '>';

	if (caption) {
		if (!tinymce.isIE)
			html += '

';
		else
			html += '

';
	}

	for (var y=0; y<rows; y++) {
		html += "
";

		for (var x=0; x<cols; x++) {
			if (!tinymce.isIE)
				html += '
	';
			else
				html += '	';
		}

		html += "
";
	}

	html += "
";

	// Move table
	if (inst.settings.fix_table_elements) {
		var patt = '';

		inst.focus();
		inst.selection.setContent('
');

		tinymce.each('h1,h2,h3,h4,h5,h6,p'.split(','), function(n) {
			if (patt)
				patt += ',';

			patt += n + ' ._mce_marker';
		});

		tinymce.each(inst.dom.select(patt), function(n) {
			inst.dom.split(inst.dom.getParent(n, 'h1,h2,h3,h4,h5,h6,p'), n);
		});

		dom.setOuterHTML(dom.select('br._mce_marker')[0], html);
	} else
		inst.execCommand('mceInsertContent', false, html);

	tinymce.each(dom.select('table[data-mce-new]'), function(node) {
		var td = dom.select('td', node);

		try {
			// IE9 might fail to do this selection
			inst.selection.select(td[0], true);
			inst.selection.collapse();
		} catch (ex) {
			// Ignore
		}

		dom.setAttrib(node, 'data-mce-new', '');
	});

	inst.addVisual();
	inst.execCommand('mceEndUndoLevel');

	tinyMCEPopup.close();
}

function makeAttrib(attrib, value) {
	var formObj = document.forms[0];
	var valueElm = formObj.elements[attrib];

	if (typeof(value) == "undefined" || value == null) {
		value = "";

		if (valueElm)
			value = valueElm.value;
	}

	if (value == "")
		return "";

	// XML encode it
	value = value.replace(/&/g, '&');
	value = value.replace(/\"/g, '"');
	value = value.replace(/</g, '<');
	value = value.replace(/>/g, '>');

	return ' ' + attrib + '="' + value + '"';
}

function init() {
	tinyMCEPopup.resizeToInnerSize();

	document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
	document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
	document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
	document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');

	var cols = 2, rows = 2, border = tinyMCEPopup.getParam('table_default_border', '0'), cellpadding = tinyMCEPopup.getParam('table_default_cellpadding', ''), cellspacing = tinyMCEPopup.getParam('table_default_cellspacing', '');
	var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = "";
	var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "", rules = "", frame = "";
	var inst = tinyMCEPopup.editor, dom = inst.dom;
	var formObj = document.forms[0];
	var elm = dom.getParent(inst.selection.getNode(), "table");

	action = tinyMCEPopup.getWindowArg('action');

	if (!action)
		action = elm ? "update" : "insert";

	if (elm && action != "insert") {
		var rowsAr = elm.rows;
		var cols = 0;
		for (var i=0; i<rowsAr.length; i++)
			if (rowsAr[i].cells.length > cols)
				cols = rowsAr[i].cells.length;

		cols = cols;
		rows = rowsAr.length;

		st = dom.parseStyle(dom.getAttrib(elm, "style"));
		border = trimSize(getStyle(elm, 'border', 'borderWidth'));
		cellpadding = dom.getAttrib(elm, 'cellpadding', "");
		cellspacing = dom.getAttrib(elm, 'cellspacing', "");
		width = trimSize(getStyle(elm, 'width', 'width'));
		height = trimSize(getStyle(elm, 'height', 'height'));
		bordercolor = convertRGBToHex(getStyle(elm, 'bordercolor', 'borderLeftColor'));
		bgcolor = convertRGBToHex(getStyle(elm, 'bgcolor', 'backgroundColor'));
		align = dom.getAttrib(elm, 'align', align);
		frame = dom.getAttrib(elm, 'frame');
		rules = dom.getAttrib(elm, 'rules');
		className = tinymce.trim(dom.getAttrib(elm, 'class').replace(/mceItem.+/g, ''));
		id = dom.getAttrib(elm, 'id');
		summary = dom.getAttrib(elm, 'summary');
		style = dom.serializeStyle(st);
		dir = dom.getAttrib(elm, 'dir');
		lang = dom.getAttrib(elm, 'lang');
		background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
		formObj.caption.checked = elm.getElementsByTagName('caption').length > 0;

		orgTableWidth = width;
		orgTableHeight = height;

		action = "update";
		formObj.insert.value = inst.getLang('update');
	}

	addClassesToList('class', "table_styles");
	TinyMCE_EditableSelects.init();

	// Update form
	selectByValue(formObj, 'align', align);
	selectByValue(formObj, 'tframe', frame);
	selectByValue(formObj, 'rules', rules);
	selectByValue(formObj, 'class', className, true, true);
	formObj.cols.value = cols;
	formObj.rows.value = rows;
	formObj.border.value = border;
	formObj.cellpadding.value = cellpadding;
	formObj.cellspacing.value = cellspacing;
	formObj.width.value = width;
	formObj.height.value = height;
	formObj.bordercolor.value = bordercolor;
	formObj.bgcolor.value = bgcolor;
	formObj.id.value = id;
	formObj.summary.value = summary;
	formObj.style.value = style;
	formObj.dir.value = dir;
	formObj.lang.value = lang;
	formObj.backgroundimage.value = background;

	updateColor('bordercolor_pick', 'bordercolor');
	updateColor('bgcolor_pick', 'bgcolor');

	// Resize some elements
	if (isVisible('backgroundimagebrowser'))
		document.getElementById('backgroundimage').style.width = '180px';

	// Disable some fields in update mode
	if (action == "update") {
		formObj.cols.disabled = true;
		formObj.rows.disabled = true;
	}
}

function changedSize() {
	var formObj = document.forms[0];
	var st = dom.parseStyle(formObj.style.value);

/*	var width = formObj.width.value;
	if (width != "")
		st['width'] = tinyMCEPopup.getParam("inline_styles") ? getCSSSize(width) : "";
	else
		st['width'] = "";*/

	var height = formObj.height.value;
	if (height != "")
		st['height'] = getCSSSize(height);
	else
		st['height'] = "";

	formObj.style.value = dom.serializeStyle(st);
}

function changedBackgroundImage() {
	var formObj = document.forms[0];
	var st = dom.parseStyle(formObj.style.value);

	st['background-image'] = "url('" + formObj.backgroundimage.value + "')";

	formObj.style.value = dom.serializeStyle(st);
}

function changedBorder() {
	var formObj = document.forms[0];
	var st = dom.parseStyle(formObj.style.value);

	// Update border width if the element has a color
	if (formObj.border.value != "" && formObj.bordercolor.value != "")
		st['border-width'] = formObj.border.value + "px";

	formObj.style.value = dom.serializeStyle(st);
}

function changedColor() {
	var formObj = document.forms[0];
	var st = dom.parseStyle(formObj.style.value);

	st['background-color'] = formObj.bgcolor.value;

	if (formObj.bordercolor.value != "") {
		st['border-color'] = formObj.bordercolor.value;

		// Add border-width if it's missing
		if (!st['border-width'])
			st['border-width'] = formObj.border.value == "" ? "1px" : formObj.border.value + "px";
	}

	formObj.style.value = dom.serializeStyle(st);
}

function changedStyle() {
	var formObj = document.forms[0];
	var st = dom.parseStyle(formObj.style.value);

	if (st['background-image'])
		formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
	else
		formObj.backgroundimage.value = '';

	if (st['width'])
		formObj.width.value = trimSize(st['width']);

	if (st['height'])
		formObj.height.value = trimSize(st['height']);

	if (st['background-color']) {
		formObj.bgcolor.value = st['background-color'];
		updateColor('bgcolor_pick','bgcolor');
	}

	if (st['border-color']) {
		formObj.bordercolor.value = st['border-color'];
		updateColor('bordercolor_pick','bordercolor');
	}
}

tinyMCEPopup.onInit.add(init);

license: mit


code:
tinyMCE.addI18n('en.table_dlg',{
general_tab:"General",
advanced_tab:"Advanced",
general_props:"General properties",
advanced_props:"Advanced properties",
rowtype:"Row in table part",
title:"Insert/Modify table",
width:"Width",
height:"Height",
cols:"Columns",
rows:"Rows",
cellspacing:"Cellspacing",
cellpadding:"Cellpadding",
border:"Border",
align:"Alignment",
align_default:"Default",
align_left:"Left",
align_right:"Right",
align_middle:"Center",
row_title:"Table row properties",
cell_title:"Table cell properties",
cell_type:"Cell type",
valign:"Vertical alignment",
align_top:"Top",
align_bottom:"Bottom",
bordercolor:"Border color",
bgcolor:"Background color",
merge_cells_title:"Merge table cells",
id:"Id",
style:"Style",
langdir:"Language direction",
langcode:"Language code",
mime:"Target MIME type",
ltr:"Left to right",
rtl:"Right to left",
bgimage:"Background image",
summary:"Summary",
td:"Data",
th:"Header",
cell_cell:"Update current cell",
cell_row:"Update all cells in row",
cell_col:"Update all cells in column",
cell_all:"Update all cells in table",
row_row:"Update current row",
row_odd:"Update odd rows in table",
row_even:"Update even rows in table",
row_all:"Update all rows in table",
thead:"Table Head",
tbody:"Table Body",
tfoot:"Table Foot",
scope:"Scope",
rowgroup:"Row Group",
colgroup:"Col Group",
col_limit:"You've exceeded the maximum number of columns of {$cols}.",
row_limit:"You've exceeded the maximum number of rows of {$rows}.",
cell_limit:"You've exceeded the maximum number of cells of {$cells}.",
missing_scope:"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.",
caption:"Table caption",
frame:"Frame",
frame_none:"none",
frame_groups:"groups",
frame_rows:"rows",
frame_cols:"cols",
frame_all:"all",
rules:"Rules",
rules_void:"void",
rules_above:"above",
rules_below:"below",
rules_hsides:"hsides",
rules_lhs:"lhs",
rules_rhs:"rhs",
rules_vsides:"vsides",
rules_box:"box",
rules_border:"border"
});


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

	<title>{#table_dlg.merge_cells_title}</title>

<form onsubmit="MergeCellsDialog.merge();return false;" action="#">
	<fieldset>
		<legend>{#table_dlg.merge_cells_title}</legend>

				{#table_dlg.cols}:
				<input type="text" id="numcols" name="numcols" value="" class="number min1 mceFocus" style="width: 30px" aria-required="true" />

				{#table_dlg.rows}:
				<input type="text" id="numrows" name="numrows" value="" class="number min1" style="width: 30px" aria-required="true" />

	</fieldset>

		<input type="submit" id="insert" name="insert" value="{#update}" />
		<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />

</form>


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

	<title>{#table_dlg.row_title}</title>

	<link href="css/row.css" rel="stylesheet" type="text/css" />

	<form onsubmit="updateAction();return false;" action="#">

{#table_dlg.general_tab}

{#table_dlg.advanced_tab}

				<fieldset>
					<legend>{#table_dlg.general_props}</legend>

							{#table_dlg.rowtype}

								<select id="rowtype" name="rowtype" class="mceFocus">
									<option value="thead">{#table_dlg.thead}</option>
									<option value="tbody">{#table_dlg.tbody}</option>
									<option value="tfoot">{#table_dlg.tfoot}</option>
								</select>

							{#table_dlg.align}

								<select id="align" name="align">
									<option value="">{#not_set}</option>
									<option value="center">{#table_dlg.align_middle}</option>
									<option value="left">{#table_dlg.align_left}</option>
									<option value="right">{#table_dlg.align_right}</option>
								</select>

							{#table_dlg.valign}

								<select id="valign" name="valign">
									<option value="">{#not_set}</option>
									<option value="top">{#table_dlg.align_top}</option>
									<option value="middle">{#table_dlg.align_middle}</option>
									<option value="bottom">{#table_dlg.align_bottom}</option>
								</select>

							{#class_name}

								<select id="class" name="class" class="mceEditableSelect">
									<option value="" selected="selected">{#not_set}</option>
								</select>

							{#table_dlg.height}
							<input name="height" type="text" id="height" value="" size="7" maxlength="7" onchange="changedSize();" class="size" />

				</fieldset>

				<fieldset>
					<legend>{#table_dlg.advanced_props}</legend>

							{#table_dlg.id}
							<input id="id" name="id" type="text" value="" style="width: 200px" />

							{#table_dlg.style}
							<input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" />

							{#table_dlg.langdir}

								<select id="dir" name="dir" style="width: 200px">
										<option value="">{#not_set}</option>
										<option value="ltr">{#table_dlg.ltr}</option>
										<option value="rtl">{#table_dlg.rtl}</option>
								</select>

							{#table_dlg.langcode}

								<input id="lang" name="lang" type="text" value="" style="width: 200px" />

							{#table_dlg.bgimage}

										<input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" />

							{#table_dlg.bgcolor}

										<input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" />

				</fieldset>

				<select id="action" name="action">
					<option value="row">{#table_dlg.row_row}</option>
					<option value="odd">{#table_dlg.row_odd}</option>
					<option value="even">{#table_dlg.row_even}</option>
					<option value="all">{#table_dlg.row_all}</option>
				</select>

			<input type="submit" id="insert" name="insert" value="{#update}" />
			<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />

	</form>


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

	<title>{#table_dlg.title}</title>

	<link href="css/table.css" rel="stylesheet" type="text/css" />

	{#table_dlg.title}
	<form onsubmit="insertTable();return false;" action="#">

{#table_dlg.general_tab}

{#table_dlg.advanced_tab}

				<fieldset>
					<legend>{#table_dlg.general_props}</legend>

							{#table_dlg.cols}
							<input id="cols" name="cols" type="text" value="" size="3" maxlength="3" class="required number min1 mceFocus" aria-required="true" />
							{#table_dlg.rows}
							<input id="rows" name="rows" type="text" value="" size="3" maxlength="3" class="required number min1" aria-required="true" />

							{#table_dlg.cellpadding}
							<input id="cellpadding" name="cellpadding" type="text" value="" size="3" maxlength="3" class="number" />
							{#table_dlg.cellspacing}
							<input id="cellspacing" name="cellspacing" type="text" value="" size="3" maxlength="3" class="number" />

							{#table_dlg.align}
							<select id="align" name="align">
								<option value="">{#not_set}</option>
								<option value="center">{#table_dlg.align_middle}</option>
								<option value="left">{#table_dlg.align_left}</option>
								<option value="right">{#table_dlg.align_right}</option>
							</select>
							{#table_dlg.border}
							<input id="border" name="border" type="text" value="" size="3" maxlength="3" onchange="changedBorder();" class="number" />

							{#table_dlg.width}
							<input name="width" type="text" id="width" value="" size="7" maxlength="7" onchange="changedSize();" class="size" />
							{#table_dlg.height}
							<input name="height" type="text" id="height" value="" size="7" maxlength="7" onchange="changedSize();" class="size" />

							{#class_name}

							 <select id="class" name="class" class="mceEditableSelect">
								<option value="" selected="selected">{#not_set}</option>
							 </select>

							{#table_dlg.caption}
							<input id="caption" name="caption" type="checkbox" class="checkbox" value="true" />

				</fieldset>

				<fieldset>
					<legend>{#table_dlg.advanced_props}</legend>

							{#table_dlg.id}
							<input id="id" name="id" type="text" value="" class="advfield" />

							{#table_dlg.summary}
							<input id="summary" name="summary" type="text" value="" class="advfield" />

							{#table_dlg.style}
							<input type="text" id="style" name="style" value="" class="advfield" onchange="changedStyle();" />

							{#table_dlg.langcode}

								<input id="lang" name="lang" type="text" value="" class="advfield" />

							{#table_dlg.bgimage}

										<input id="backgroundimage" name="backgroundimage" type="text" value="" class="advfield" onchange="changedBackgroundImage();" />

							{#table_dlg.frame}

								<select id="tframe" name="tframe" class="advfield">
										<option value="">{#not_set}</option>
										<option value="void">{#table_dlg.rules_void}</option>
										<option value="above">{#table_dlg.rules_above}</option>
										<option value="below">{#table_dlg.rules_below}</option>
										<option value="hsides">{#table_dlg.rules_hsides}</option>
										<option value="lhs">{#table_dlg.rules_lhs}</option>
										<option value="rhs">{#table_dlg.rules_rhs}</option>
										<option value="vsides">{#table_dlg.rules_vsides}</option>
										<option value="box">{#table_dlg.rules_box}</option>
										<option value="border">{#table_dlg.rules_border}</option>
								</select>

							{#table_dlg.rules}

								<select id="rules" name="rules" class="advfield">
										<option value="">{#not_set}</option>
										<option value="none">{#table_dlg.frame_none}</option>
										<option value="groups">{#table_dlg.frame_groups}</option>
										<option value="rows">{#table_dlg.frame_rows}</option>
										<option value="cols">{#table_dlg.frame_cols}</option>
										<option value="all">{#table_dlg.frame_all}</option>
									</select>

							{#table_dlg.langdir}

								<select id="dir" name="dir" class="advfield">
										<option value="">{#not_set}</option>
										<option value="ltr">{#table_dlg.ltr}</option>
										<option value="rtl">{#table_dlg.rtl}</option>
								</select>

							{#table_dlg.bordercolor}

										<input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" />

							{#table_dlg.bgcolor}

										<input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" />

				</fieldset>

			<input type="submit" id="insert" name="insert" value="{#insert}" />
			<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />

	</form>


code:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>blank_page</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<script type="text/javascript">
		parent.TemplateDialog.loadCSSFiles(document);
	</script>
</head>
<body id="mceTemplatePreview" class="mceContentBody">

</body>
</html>


code:
#frmbody {
	padding: 10px;
	background-color: #FFF;
	border: 1px solid #CCC;
}

.frmRow {
	margin-bottom: 10px;
}

#templatesrc {
	border: none;
	width: 320px;
	height: 240px;
}

.title {
	padding-bottom: 5px;
}

.mceActionPanel {
	padding-top: 5px;
}


code:
/**
 * editor_plugin_src.js
 *
 * Copyright 2009, Moxiecode Systems AB
 * Released under LGPL License.
 *
 * License: http://tinymce.moxiecode.com/license
 * Contributing: http://tinymce.moxiecode.com/contributing
 */

(function() {
	var each = tinymce.each;

	tinymce.create('tinymce.plugins.TemplatePlugin', {
		init : function(ed, url) {
			var t = this;

			t.editor = ed;

			// Register commands
			ed.addCommand('mceTemplate', function(ui) {
				ed.windowManager.open({
					file : url + '/template.htm',
					width : ed.getParam('template_popup_width', 750),
					height : ed.getParam('template_popup_height', 600),
					inline : 1
				}, {
					plugin_url : url
				});
			});

			ed.addCommand('mceInsertTemplate', t._insertTemplate, t);

			// Register buttons
			ed.addButton('template', {title : 'template.desc', cmd : 'mceTemplate'});

			ed.onPreProcess.add(function(ed, o) {
				var dom = ed.dom;

				each(dom.select('div', o.node), function(e) {
					if (dom.hasClass(e, 'mceTmpl')) {
						each(dom.select('*', e), function(e) {
							if (dom.hasClass(e, ed.getParam('template_mdate_classes', 'mdate').replace(/\s+/g, '|')))
								e.innerHTML = t._getDateTime(new Date(), ed.getParam("template_mdate_format", ed.getLang("template.mdate_format")));
						});

						t._replaceVals(e);
					}
				});
			});
		},

		getInfo : function() {
			return {
				longname : 'Template plugin',
				author : 'Moxiecode Systems AB',
				authorurl : 'http://www.moxiecode.com',
				infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/template',
				version : tinymce.majorVersion + "." + tinymce.minorVersion
			};
		},

		_insertTemplate : function(ui, v) {
			var t = this, ed = t.editor, h, el, dom = ed.dom, sel = ed.selection.getContent();

			h = v.content;

			each(t.editor.getParam('template_replace_values'), function(v, k) {
				if (typeof(v) != 'function')
					h = h.replace(new RegExp('\\{\\$' + k + '\\}', 'g'), v);
			});

			el = dom.create('div', null, h);

			// Find template element within div
			n = dom.select('.mceTmpl', el);
			if (n && n.length > 0) {
				el = dom.create('div', null);
				el.appendChild(n[0].cloneNode(true));
			}

			function hasClass(n, c) {
				return new RegExp('\\b' + c + '\\b', 'g').test(n.className);
			};

			each(dom.select('*', el), function(n) {
				// Replace cdate
				if (hasClass(n, ed.getParam('template_cdate_classes', 'cdate').replace(/\s+/g, '|')))
					n.innerHTML = t._getDateTime(new Date(), ed.getParam("template_cdate_format", ed.getLang("template.cdate_format")));

				// Replace mdate
				if (hasClass(n, ed.getParam('template_mdate_classes', 'mdate').replace(/\s+/g, '|')))
					n.innerHTML = t._getDateTime(new Date(), ed.getParam("template_mdate_format", ed.getLang("template.mdate_format")));

				// Replace selection
				if (hasClass(n, ed.getParam('template_selected_content_classes', 'selcontent').replace(/\s+/g, '|')))
					n.innerHTML = sel;
			});

			t._replaceVals(el);

			ed.execCommand('mceInsertContent', false, el.innerHTML);
			ed.addVisual();
		},

		_replaceVals : function(e) {
			var dom = this.editor.dom, vl = this.editor.getParam('template_replace_values');

			each(dom.select('*', e), function(e) {
				each(vl, function(v, k) {
					if (dom.hasClass(e, k)) {
						if (typeof(vl[k]) == 'function')
							vl[k](e);
					}
				});
			});
		},

		_getDateTime : function(d, fmt) {
				if (!fmt)
					return "";

				function addZeros(value, len) {
					var i;

					value = "" + value;

					if (value.length < len) {
						for (i=0; i<(len-value.length); i++)
							value = "0" + value;
					}

					return value;
				}

				fmt = fmt.replace("%D", "%m/%d/%y");
				fmt = fmt.replace("%r", "%I:%M:%S %p");
				fmt = fmt.replace("%Y", "" + d.getFullYear());
				fmt = fmt.replace("%y", "" + d.getYear());
				fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2));
				fmt = fmt.replace("%d", addZeros(d.getDate(), 2));
				fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2));
				fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2));
				fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2));
				fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1));
				fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM"));
				fmt = fmt.replace("%B", "" + this.editor.getLang("template_months_long").split(',')[d.getMonth()]);
				fmt = fmt.replace("%b", "" + this.editor.getLang("template_months_short").split(',')[d.getMonth()]);
				fmt = fmt.replace("%A", "" + this.editor.getLang("template_day_long").split(',')[d.getDay()]);
				fmt = fmt.replace("%a", "" + this.editor.getLang("template_day_short").split(',')[d.getDay()]);
				fmt = fmt.replace("%%", "%");

				return fmt;
		}
	});

	// Register plugin
	tinymce.PluginManager.add('template', tinymce.plugins.TemplatePlugin);
})();


code:
tinyMCEPopup.requireLangPack();

var TemplateDialog = {
	preInit : function() {
		var url = tinyMCEPopup.getParam("template_external_list_url");

		if (url != null)
			document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></sc'+'ript>');
	},

	init : function() {
		var ed = tinyMCEPopup.editor, tsrc, sel, x, u;

 		tsrc = ed.getParam("template_templates", false);
 		sel = document.getElementById('tpath');

		// Setup external template list
		if (!tsrc && typeof(tinyMCETemplateList) != 'undefined') {
			for (x=0, tsrc = []; x<tinyMCETemplateList.length; x++)
				tsrc.push({title : tinyMCETemplateList[x][0], src : tinyMCETemplateList[x][1], description : tinyMCETemplateList[x][2]});
		}

		for (x=0; x<tsrc.length; x++)
			sel.options[sel.options.length] = new Option(tsrc[x].title, tinyMCEPopup.editor.documentBaseURI.toAbsolute(tsrc[x].src));

		this.resize();
		this.tsrc = tsrc;
	},

	resize : function() {
		var w, h, e;

		if (!self.innerWidth) {
			w = document.body.clientWidth - 50;
			h = document.body.clientHeight - 160;
		} else {
			w = self.innerWidth - 50;
			h = self.innerHeight - 170;
		}

		e = document.getElementById('templatesrc');

		if (e) {
			e.style.height = Math.abs(h) + 'px';
			e.style.width = Math.abs(w - 5) + 'px';
		}
	},

	loadCSSFiles : function(d) {
		var ed = tinyMCEPopup.editor;

		tinymce.each(ed.getParam("content_css", '').split(','), function(u) {
			d.write('<link href="' + ed.documentBaseURI.toAbsolute(u) + '" rel="stylesheet" type="text/css" />');
		});
	},

	selectTemplate : function(u, ti) {
		var d = window.frames['templatesrc'].document, x, tsrc = this.tsrc;

		if (!u)
			return;

		d.body.innerHTML = this.templateHTML = this.getFileContents(u);

		for (x=0; x<tsrc.length; x++) {
			if (tsrc[x].title == ti)
				document.getElementById('tmpldesc').innerHTML = tsrc[x].description || '';
		}
	},

 	insert : function() {
		tinyMCEPopup.execCommand('mceInsertTemplate', false, {
			content : this.templateHTML,
			selection : tinyMCEPopup.editor.selection.getContent()
		});

		tinyMCEPopup.close();
	},

	getFileContents : function(u) {
		var x, d, t = 'text/plain';

		function g(s) {
			x = 0;

			try {
				x = new ActiveXObject(s);
			} catch (s) {
			}

			return x;
		};

		x = window.ActiveXObject ? g('Msxml2.XMLHTTP') || g('Microsoft.XMLHTTP') : new XMLHttpRequest();

		// Synchronous AJAX load file
		x.overrideMimeType && x.overrideMimeType(t);
		x.open("GET", u, false);
		x.send(null);

		return x.responseText;
	}
};

TemplateDialog.preInit();
tinyMCEPopup.onInit.add(TemplateDialog.init, TemplateDialog);


code:
tinyMCE.addI18n('en.template_dlg',{
title:"Templates",
label:"Template",
desc_label:"Description",
desc:"Insert predefined template content",
select:"Select a template",
preview:"Preview",
warning:"Warning: Updating a template with a different one may cause data loss.",
mdate_format:"%Y-%m-%d %H:%M:%S",
cdate_format:"%Y-%m-%d %H:%M:%S",
months_long:"January,February,March,April,May,June,July,August,September,October,November,December",
months_short:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",
day_long:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun"
});


code:
	<title>{#template_dlg.title}</title>

	<link href="css/template.css" rel="stylesheet" type="text/css" />

	<form onsubmit="TemplateDialog.insert();return false;">

{#template_dlg.desc}

{#template_dlg.label}:
			<select id="tpath" name="tpath" onchange="TemplateDialog.selectTemplate(this.options[this.selectedIndex].value, this.options[this.selectedIndex].text);" class="mceFocus">
				<option value="">{#template_dlg.select}...</option>
			</select>

{#template_dlg.desc_label}:

			<fieldset>
				<legend>{#template_dlg.preview}</legend>

			</fieldset>

			<input type="submit" id="insert" name="insert" value="{#insert}" />
			<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />

	</form>


code:
/**
 * editor_plugin_src.js
 *
 * Copyright 2009, Moxiecode Systems AB
 * Released under LGPL License.
 *
 * License: http://tinymce.moxiecode.com/license
 * Contributing: http://tinymce.moxiecode.com/contributing
 */

(function() {
	tinymce.create('tinymce.plugins.VisualChars', {
		init : function(ed, url) {
			var t = this;

			t.editor = ed;

			// Register commands
			ed.addCommand('mceVisualChars', t._toggleVisualChars, t);

			// Register buttons
			ed.addButton('visualchars', {title : 'visualchars.desc', cmd : 'mceVisualChars'});

			ed.onBeforeGetContent.add(function(ed, o) {
				if (t.state && o.format != 'raw' && !o.draft) {
					t.state = true;
					t._toggleVisualChars(false);
				}
			});
		},

		getInfo : function() {
			return {
				longname : 'Visual characters',
				author : 'Moxiecode Systems AB',
				authorurl : 'http://tinymce.moxiecode.com',
				infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars',
				version : tinymce.majorVersion + "." + tinymce.minorVersion
			};
		},

		// Private methods

		_toggleVisualChars : function(bookmark) {
			var t = this, ed = t.editor, nl, i, h, d = ed.getDoc(), b = ed.getBody(), nv, s = ed.selection, bo, div, bm;

			t.state = !t.state;
			ed.controlManager.setActive('visualchars', t.state);

			if (bookmark)
				bm = s.getBookmark();

			if (t.state) {
				nl = [];
				tinymce.walk(b, function(n) {
					if (n.nodeType == 3 && n.nodeValue && n.nodeValue.indexOf('\u00a0') != -1)
						nl.push(n);
				}, 'childNodes');

				for (i = 0; i < nl.length; i++) {
					nv = nl[i].nodeValue;
					nv = nv.replace(/(\u00a0)/g, '$1');

					div = ed.dom.create('div', null, nv);
					while (node = div.lastChild)
						ed.dom.insertAfter(node, nl[i]);

					ed.dom.remove(nl[i]);
				}
			} else {
				nl = ed.dom.select('span.mceItemNbsp', b);

				for (i = nl.length - 1; i >= 0; i--)
					ed.dom.remove(nl[i], 1);
			}

			s.moveToBookmark(bm);
		}
	});

	// Register plugin
	tinymce.PluginManager.add('visualchars', tinymce.plugins.VisualChars);
})();


code:
/**
 * editor_plugin_src.js
 *
 * Copyright 2009, Moxiecode Systems AB
 * Released under LGPL License.
 *
 * License: http://tinymce.moxiecode.com/license
 * Contributing: http://tinymce.moxiecode.com/contributing
 */

(function() {
	tinymce.create('tinymce.plugins.WordCount', {
		block : 0,
		id : null,
		countre : null,
		cleanre : null,

		init : function(ed, url) {
			var t = this, last = 0;

			t.countre = ed.getParam('wordcount_countregex', /[\w\u2019\'-]+/g); // u2019 == ’
			t.cleanre = ed.getParam('wordcount_cleanregex', /[0-9.(),;:!?%#$?\'\"_+=\\\/-]*/g);
			t.id = ed.id + '-word-count';

			ed.onPostRender.add(function(ed, cm) {
				var row, id;

				// Add it to the specified id or the theme advanced path
				id = ed.getParam('wordcount_target_id');
				if (!id) {
					row = tinymce.DOM.get(ed.id + '_path_row');

					if (row)
						tinymce.DOM.add(row.parentNode, 'div', {'style': 'float: right'}, ed.getLang('wordcount.words', 'Words: ') + '0');
				} else {
					tinymce.DOM.add(id, 'span', {}, '0');
				}
			});

			ed.onInit.add(function(ed) {
				ed.selection.onSetContent.add(function() {
					t._count(ed);
				});

				t._count(ed);
			});

			ed.onSetContent.add(function(ed) {
				t._count(ed);
			});

			ed.onKeyUp.add(function(ed, e) {
				if (e.keyCode == last)
					return;

				if (13 == e.keyCode || 8 == last || 46 == last)
					t._count(ed);

				last = e.keyCode;
			});
		},

		_getCount : function(ed) {
			var tc = 0;
			var tx = ed.getContent({ format: 'raw' });

			if (tx) {
					tx = tx.replace(/\.\.\./g, ' '); // convert ellipses to spaces
					tx = tx.replace(/<.[^<>]*?>/g, ' ').replace(/ | /gi, ' '); // remove html tags and space chars

					// deal with html entities
					tx = tx.replace(/(\w+)(&.+?;)+(\w+)/, "$1$3").replace(/&.+?;/g, ' ');
					tx = tx.replace(this.cleanre, ''); // remove numbers and punctuation

					var wordArray = tx.match(this.countre);
					if (wordArray) {
							tc = wordArray.length;
					}
			}

			return tc;
		},

		_count : function(ed) {
			var t = this;

			// Keep multiple calls from happening at the same time
			if (t.block)
				return;

			t.block = 1;

			setTimeout(function() {
					var tc = t._getCount(ed);

					tinymce.DOM.setHTML(t.id, tc.toString());

					setTimeout(function() {t.block = 0;}, 2000);
			}, 1);
		},

		getInfo: function() {
			return {
				longname : 'Word Count plugin',
				author : 'Moxiecode Systems AB',
				authorurl : 'http://tinymce.moxiecode.com',
				infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount',
				version : tinymce.majorVersion + "." + tinymce.minorVersion
			};
		}
	});

	tinymce.PluginManager.add('wordcount', tinymce.plugins.WordCount);
})();


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

	<title>{#xhtmlxtras_dlg.title_abbr_element}</title>

	<link rel="stylesheet" type="text/css" href="css/popup.css" />

{#xhtmlxtras_dlg.title_abbr_element}
<form onsubmit="insertAbbr();return false;" action="#">

{#xhtmlxtras_dlg.general_tab}

			<fieldset>
				<legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>

						{#xhtmlxtras_dlg.attribute_label_title}:
						<input id="title" name="title" type="text" value="" class="field mceFocus" />

						{#xhtmlxtras_dlg.attribute_label_id}:
						<input id="id" name="id" type="text" value="" class="field" />

						{#xhtmlxtras_dlg.attribute_label_class}:

							<select id="class" name="class" class="field mceEditableSelect">
								<option value="">{#not_set}</option>
							</select>

						{#xhtmlxtras_dlg.attribute_label_style}:
						<input id="style" name="style" type="text" value="" class="field" />

						{#xhtmlxtras_dlg.attribute_label_langdir}:

							<select id="dir" name="dir" class="field">
								<option value="">{#not_set}</option>
								<option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
								<option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
							</select>

						{#xhtmlxtras_dlg.attribute_label_langcode}:

							<input id="lang" name="lang" type="text" value="" class="field" />

			</fieldset>

			<fieldset>
				<legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>

						onfocus:
						<input id="onfocus" name="onfocus" type="text" value="" class="field" />

						onblur:
						<input id="onblur" name="onblur" type="text" value="" class="field" />

						onclick:
						<input id="onclick" name="onclick" type="text" value="" class="field" />

						ondblclick:
						<input id="ondblclick" name="ondblclick" type="text" value="" class="field" />

						onmousedown:
						<input id="onmousedown" name="onmousedown" type="text" value="" class="field" />

						onmouseup:
						<input id="onmouseup" name="onmouseup" type="text" value="" class="field" />

						onmouseover:
						<input id="onmouseover" name="onmouseover" type="text" value="" class="field" />

						onmousemove:
						<input id="onmousemove" name="onmousemove" type="text" value="" class="field" />

						onmouseout:
						<input id="onmouseout" name="onmouseout" type="text" value="" class="field" />

						onkeypress:
						<input id="onkeypress" name="onkeypress" type="text" value="" class="field" />

						onkeydown:
						<input id="onkeydown" name="onkeydown" type="text" value="" class="field" />

						onkeyup:
						<input id="onkeyup" name="onkeyup" type="text" value="" class="field" />

			</fieldset>

		<input type="submit" id="insert" name="insert" value="{#update}" />
		<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeAbbr();" style="display: none;" />
		<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />

</form>


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

	<title>{#xhtmlxtras_dlg.title_acronym_element}</title>

	<link rel="stylesheet" type="text/css" href="css/popup.css" />

{#xhtmlxtras_dlg.title_acronym_element}
<form onsubmit="insertAcronym();return false;" action="#">

{#xhtmlxtras_dlg.general_tab}

			<fieldset>
				<legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>

						{#xhtmlxtras_dlg.attribute_label_title}:
						<input id="title" name="title" type="text" value="" class="field mceFocus" />

						{#xhtmlxtras_dlg.attribute_label_id}:
						<input id="id" name="id" type="text" value="" class="field" />

						{#xhtmlxtras_dlg.attribute_label_class}:

							<select id="class" name="class" class="field mceEditableSelect">
								<option value="">{#not_set}</option>
							</select>

						{#xhtmlxtras_dlg.attribute_label_style}:
						<input id="style" name="style" type="text" value="" class="field" />

						{#xhtmlxtras_dlg.attribute_label_langdir}:

							<select id="dir" name="dir" class="field">
								<option value="">{#not_set}</option>
								<option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
								<option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
							</select>

						{#xhtmlxtras_dlg.attribute_label_langcode}:

							<input id="lang" name="lang" type="text" value="" class="field" />

			</fieldset>

			<fieldset>
				<legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>

						onfocus:
						<input id="onfocus" name="onfocus" type="text" value="" class="field" />

						onblur:
						<input id="onblur" name="onblur" type="text" value="" class="field" />

						onclick:
						<input id="onclick" name="onclick" type="text" value="" class="field" />

						ondblclick:
						<input id="ondblclick" name="ondblclick" type="text" value="" class="field" />

						onmousedown:
						<input id="onmousedown" name="onmousedown" type="text" value="" class="field" />

						onmouseup:
						<input id="onmouseup" name="onmouseup" type="text" value="" class="field" />

						onmouseover:
						<input id="onmouseover" name="onmouseover" type="text" value="" class="field" />

						onmousemove:
						<input id="onmousemove" name="onmousemove" type="text" value="" class="field" />

						onmouseout:
						<input id="onmouseout" name="onmouseout" type="text" value="" class="field" />

						onkeypress:
						<input id="onkeypress" name="onkeypress" type="text" value="" class="field" />

						onkeydown:
						<input id="onkeydown" name="onkeydown" type="text" value="" class="field" />

						onkeyup:
						<input id="onkeyup" name="onkeyup" type="text" value="" class="field" />

			</fieldset>

		<input type="submit" id="insert" name="insert" value="{#update}" />
		<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeAcronym();" style="display: none;" />
		<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />

</form>


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

	<title>{#xhtmlxtras_dlg.attribs_title}</title>

	<link rel="stylesheet" type="text/css" href="css/attributes.css" />

{#xhtmlxtras_dlg.attribs_title}
<form onsubmit="insertAction();return false;" action="#">

{#xhtmlxtras_dlg.attribute_attrib_tab}

{#xhtmlxtras_dlg.attribute_events_tab}

			<fieldset>
				<legend>{#xhtmlxtras_dlg.attribute_attrib_tab}</legend>

						{#xhtmlxtras_dlg.attribute_label_title}:
						<input id="title" name="title" type="text" value="" class="mceFocus" />

						{#xhtmlxtras_dlg.attribute_label_id}:
						<input id="id" name="id" type="text" value="" />

						{#class_name}

							<select id="classlist" name="classlist" class="mceEditableSelect">
								<option value="" selected="selected">{#not_set}</option>
							</select>

						{#xhtmlxtras_dlg.attribute_label_style}:
						<input id="style" name="style" type="text" value="" />

						{#xhtmlxtras_dlg.attribute_label_langdir}:

							<select id="dir" name="dir">
								<option value="">{#not_set}</option>
								<option value="ltr">{#xhtmlxtras_dlg.option_ltr}</option>
								<option value="rtl">{#xhtmlxtras_dlg.option_rtl}</option>
							</select>

						{#xhtmlxtras_dlg.attribute_label_langcode}:

							<input id="lang" name="lang" type="text" value="" />

							{#xhtmlxtras_dlg.attribute_label_tabindex}
							<input type="text" id="tabindex" name="tabindex" value="" />

							{#xhtmlxtras_dlg.attribute_label_accesskey}
							<input type="text" id="accesskey" name="accesskey" value="" />

			</fieldset>

			<fieldset>
				<legend>{#xhtmlxtras_dlg.attribute_events_tab}</legend>

						onfocus:
						<input id="onfocus" name="onfocus" type="text" value="" />

						onblur:
						<input id="onblur" name="onblur" type="text" value="" />

						onclick:
						<input id="onclick" name="onclick" type="text" value="" />

						ondblclick:
						<input id="ondblclick" name="ondblclick" type="text" value="" />

						onmousedown:
						<input id="onmousedown" name="onmousedown" type="text" value="" />

						onmouseup:
						<input id="onmouseup" name="onmouseup" type="text" value="" />

						onmouseover:
						<input id="onmouseover" name="onmouseover" type="text" value="" />

						onmousemove:
						<input id="onmousemove" name="onmousemove" type="text" value="" />

						onmouseout:
						<input id="onmouseout" name="onmouseout" type="text" value="" />

						onkeypress:
						<input id="onkeypress" name="onkeypress" type="text" value="" />

						onkeydown:
						<input id="onkeydown" name="onkeydown" type="text" value="" />

						onkeyup:
						<input id="onkeyup" name="onkeyup" type="text" value="" />

			</fieldset>

		<input type="submit" id="insert" name="insert" value="{#insert}" />
		<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />

</form>


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

	<title>{#xhtmlxtras_dlg.title_cite_element}</title>

	<link rel="stylesheet" type="text/css" href="css/popup.css" />

{#xhtmlxtras_dlg.title_cite_element}
<form onsubmit="insertCite();return false;" action="#">

{#xhtmlxtras_dlg.general_tab}

			<fieldset>
				<legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>

						{#xhtmlxtras_dlg.attribute_label_title}:
						<input id="title" name="title" type="text" value="" class="field mceFocus" />

						{#xhtmlxtras_dlg.attribute_label_id}:
						<input id="id" name="id" type="text" value="" class="field" />

						{#xhtmlxtras_dlg.attribute_label_class}:

							<select id="class" name="class" class="field mceEditableSelect">
								<option value="">{#not_set}</option>
							</select>

						{#xhtmlxtras_dlg.attribute_label_style}:
						<input id="style" name="style" type="text" value="" class="field" />

						{#xhtmlxtras_dlg.attribute_label_langdir}:

							<select id="dir" name="dir" class="field">
								<option value="">{#not_set}</option>
								<option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
								<option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
							</select>

						{#xhtmlxtras_dlg.attribute_label_langcode}:

							<input id="lang" name="lang" type="text" value="" class="field" />

			</fieldset>

			<fieldset>
				<legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>

						onfocus:
						<input id="onfocus" name="onfocus" type="text" value="" class="field" />

						onblur:
						<input id="onblur" name="onblur" type="text" value="" class="field" />

						onclick:
						<input id="onclick" name="onclick" type="text" value="" class="field" />

						ondblclick:
						<input id="ondblclick" name="ondblclick" type="text" value="" class="field" />

						onmousedown:
						<input id="onmousedown" name="onmousedown" type="text" value="" class="field" />

						onmouseup:
						<input id="onmouseup" name="onmouseup" type="text" value="" class="field" />

						onmouseover:
						<input id="onmouseover" name="onmouseover" type="text" value="" class="field" />

						onmousemove:
						<input id="onmousemove" name="onmousemove" type="text" value="" class="field" />

						onmouseout:
						<input id="onmouseout" name="onmouseout" type="text" value="" class="field" />

						onkeypress:
						<input id="onkeypress" name="onkeypress" type="text" value="" class="field" />

						onkeydown:
						<input id="onkeydown" name="onkeydown" type="text" value="" class="field" />

						onkeyup:
						<input id="onkeyup" name="onkeyup" type="text" value="" class="field" />

			</fieldset>

		<input type="submit" id="insert" name="insert" value="{#update}" />
		<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeCite();" style="display: none;" />
		<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />

</form>


code:
.panel_wrapper div.current {
	height: 290px;
}

#id, #style, #title, #dir, #hreflang, #lang, #classlist, #tabindex, #accesskey {
	width: 200px;
}

#events_panel input {
	width: 200px;
}


code:
input.field, select.field {width:200px;}
input.picker {width:179px; margin-left: 5px;}
input.disabled {border-color:#F2F2F2;}
img.picker {vertical-align:text-bottom; cursor:pointer;}
h1 {padding: 0 0 5px 0;}
.panel_wrapper div.current {height:160px;}
#xhtmlxtrasdel .panel_wrapper div.current, #xhtmlxtrasins .panel_wrapper div.current {height: 230px;}
a.browse span {display:block; width:20px; height:20px; background:url('../../../themes/advanced/img/icons.gif') -140px -20px;}
#datetime {width:180px;}


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

	<title>{#xhtmlxtras_dlg.title_del_element}</title>

	<link rel="stylesheet" type="text/css" href="css/popup.css" />

{#xhtmlxtras_dlg.title_del_element}
<form onsubmit="insertDel();return false;" action="#">

{#xhtmlxtras_dlg.general_tab}

			<fieldset>
				<legend>{#xhtmlxtras_dlg.fieldset_general_tab}</legend>

						{#xhtmlxtras_dlg.attribute_label_datetime}:

									<input id="datetime" name="datetime" type="text" value="" maxlength="19" class="field mceFocus" />

						{#xhtmlxtras_dlg.attribute_label_cite}:
						<input id="cite" name="cite" type="text" value="" class="field" />

			</fieldset>
			<fieldset>
				<legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>

						{#xhtmlxtras_dlg.attribute_label_title}:
						<input id="title" name="title" type="text" value="" class="field" />

						{#xhtmlxtras_dlg.attribute_label_id}:
						<input id="id" name="id" type="text" value="" class="field" />

						{#xhtmlxtras_dlg.attribute_label_class}:

							<select id="class" name="class" class="field mceEditableSelect">
								<option value="">{#not_set}</option>
							</select>

						{#xhtmlxtras_dlg.attribute_label_style}:
						<input id="style" name="style" type="text" value="" class="field" />

						{#xhtmlxtras_dlg.attribute_label_langdir}:

							<select id="dir" name="dir" class="field">
								<option value="">{#not_set}</option>
								<option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
								<option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
							</select>

						{#xhtmlxtras_dlg.attribute_label_langcode}:

							<input id="lang" name="lang" type="text" value="" class="field" />

			</fieldset>

			<fieldset>
				<legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>

						onfocus:
						<input id="onfocus" name="onfocus" type="text" value="" class="field" />

						onblur:
						<input id="onblur" name="onblur" type="text" value="" class="field" />

						onclick:
						<input id="onclick" name="onclick" type="text" value="" class="field" />

						ondblclick:
						<input id="ondblclick" name="ondblclick" type="text" value="" class="field" />

						onmousedown:
						<input id="onmousedown" name="onmousedown" type="text" value="" class="field" />

						onmouseup:
						<input id="onmouseup" name="onmouseup" type="text" value="" class="field" />

						onmouseover:
						<input id="onmouseover" name="onmouseover" type="text" value="" class="field" />

						onmousemove:
						<input id="onmousemove" name="onmousemove" type="text" value="" class="field" />

						onmouseout:
						<input id="onmouseout" name="onmouseout" type="text" value="" class="field" />

						onkeypress:
						<input id="onkeypress" name="onkeypress" type="text" value="" class="field" />

						onkeydown:
						<input id="onkeydown" name="onkeydown" type="text" value="" class="field" />

						onkeyup:
						<input id="onkeyup" name="onkeyup" type="text" value="" class="field" />

			</fieldset>

		<input type="submit" id="insert" name="insert" value="{#update}" />
		<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeDel();" style="display: none;" />
		<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />

</form>


code:
/**
 * editor_plugin_src.js
 *
 * Copyright 2009, Moxiecode Systems AB
 * Released under LGPL License.
 *
 * License: http://tinymce.moxiecode.com/license
 * Contributing: http://tinymce.moxiecode.com/contributing
 */

(function() {
	tinymce.create('tinymce.plugins.XHTMLXtrasPlugin', {
		init : function(ed, url) {
			// Register commands
			ed.addCommand('mceCite', function() {
				ed.windowManager.open({
					file : url + '/cite.htm',
					width : 350 + parseInt(ed.getLang('xhtmlxtras.cite_delta_width', 0)),
					height : 250 + parseInt(ed.getLang('xhtmlxtras.cite_delta_height', 0)),
					inline : 1
				}, {
					plugin_url : url
				});
			});

			ed.addCommand('mceAcronym', function() {
				ed.windowManager.open({
					file : url + '/acronym.htm',
					width : 350 + parseInt(ed.getLang('xhtmlxtras.acronym_delta_width', 0)),
					height : 250 + parseInt(ed.getLang('xhtmlxtras.acronym_delta_height', 0)),
					inline : 1
				}, {
					plugin_url : url
				});
			});

			ed.addCommand('mceAbbr', function() {
				ed.windowManager.open({
					file : url + '/abbr.htm',
					width : 350 + parseInt(ed.getLang('xhtmlxtras.abbr_delta_width', 0)),
					height : 250 + parseInt(ed.getLang('xhtmlxtras.abbr_delta_height', 0)),
					inline : 1
				}, {
					plugin_url : url
				});
			});

			ed.addCommand('mceDel', function() {
				ed.windowManager.open({
					file : url + '/del.htm',
					width : 340 + parseInt(ed.getLang('xhtmlxtras.del_delta_width', 0)),
					height : 310 + parseInt(ed.getLang('xhtmlxtras.del_delta_height', 0)),
					inline : 1
				}, {
					plugin_url : url
				});
			});

			ed.addCommand('mceIns', function() {
				ed.windowManager.open({
					file : url + '/ins.htm',
					width : 340 + parseInt(ed.getLang('xhtmlxtras.ins_delta_width', 0)),
					height : 310 + parseInt(ed.getLang('xhtmlxtras.ins_delta_height', 0)),
					inline : 1
				}, {
					plugin_url : url
				});
			});

			ed.addCommand('mceAttributes', function() {
				ed.windowManager.open({
					file : url + '/attributes.htm',
					width : 380 + parseInt(ed.getLang('xhtmlxtras.attr_delta_width', 0)),
					height : 370 + parseInt(ed.getLang('xhtmlxtras.attr_delta_height', 0)),
					inline : 1
				}, {
					plugin_url : url
				});
			});

			// Register buttons
			ed.addButton('cite', {title : 'xhtmlxtras.cite_desc', cmd : 'mceCite'});
			ed.addButton('acronym', {title : 'xhtmlxtras.acronym_desc', cmd : 'mceAcronym'});
			ed.addButton('abbr', {title : 'xhtmlxtras.abbr_desc', cmd : 'mceAbbr'});
			ed.addButton('del', {title : 'xhtmlxtras.del_desc', cmd : 'mceDel'});
			ed.addButton('ins', {title : 'xhtmlxtras.ins_desc', cmd : 'mceIns'});
			ed.addButton('attribs', {title : 'xhtmlxtras.attribs_desc', cmd : 'mceAttributes'});

			ed.onNodeChange.add(function(ed, cm, n, co) {
				n = ed.dom.getParent(n, 'CITE,ACRONYM,ABBR,DEL,INS');

				cm.setDisabled('cite', co);
				cm.setDisabled('acronym', co);
				cm.setDisabled('abbr', co);
				cm.setDisabled('del', co);
				cm.setDisabled('ins', co);
				cm.setDisabled('attribs', n && n.nodeName == 'BODY');
				cm.setActive('cite', 0);
				cm.setActive('acronym', 0);
				cm.setActive('abbr', 0);
				cm.setActive('del', 0);
				cm.setActive('ins', 0);

				// Activate all
				if (n) {
					do {
						cm.setDisabled(n.nodeName.toLowerCase(), 0);
						cm.setActive(n.nodeName.toLowerCase(), 1);
					} while (n = n.parentNode);
				}
			});

			ed.onPreInit.add(function() {
				// Fixed IE issue where it can't handle these elements correctly
				ed.dom.create('abbr');
			});
		},

		getInfo : function() {
			return {
				longname : 'XHTML Xtras Plugin',
				author : 'Moxiecode Systems AB',
				authorurl : 'http://tinymce.moxiecode.com',
				infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras',
				version : tinymce.majorVersion + "." + tinymce.minorVersion
			};
		}
	});

	// Register plugin
	tinymce.PluginManager.add('xhtmlxtras', tinymce.plugins.XHTMLXtrasPlugin);
})();


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

	<title>{#xhtmlxtras_dlg.title_ins_element}</title>

	<link rel="stylesheet" type="text/css" href="css/popup.css" />

{#xhtmlxtras_dlg.title_ins_element}
<form onsubmit="insertIns();return false;" action="#">

{#xhtmlxtras_dlg.general_tab}

			<fieldset>
				<legend>{#xhtmlxtras_dlg.fieldset_general_tab}</legend>

						{#xhtmlxtras_dlg.attribute_label_datetime}:

									<input id="datetime" name="datetime" type="text" value="" maxlength="19" class="field mceFocus" />

						{#xhtmlxtras_dlg.attribute_label_cite}:
						<input id="cite" name="cite" type="text" value="" class="field" />

			</fieldset>
			<fieldset>
				<legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>

						{#xhtmlxtras_dlg.attribute_label_title}:
						<input id="title" name="title" type="text" value="" class="field" />

						{#xhtmlxtras_dlg.attribute_label_id}:
						<input id="id" name="id" type="text" value="" class="field" />

						{#xhtmlxtras_dlg.attribute_label_class}:

							<select id="class" name="class" class="field mceEditableSelect">
								<option value="">{#not_set}</option>
							</select>

						{#xhtmlxtras_dlg.attribute_label_style}:
						<input id="style" name="style" type="text" value="" class="field" />

						{#xhtmlxtras_dlg.attribute_label_langdir}:

							<select id="dir" name="dir" class="field">
								<option value="">{#not_set}</option>
								<option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
								<option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
							</select>

						{#xhtmlxtras_dlg.attribute_label_langcode}:

							<input id="lang" name="lang" type="text" value="" class="field" />

			</fieldset>

			<fieldset>
				<legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>

						onfocus:
						<input id="onfocus" name="onfocus" type="text" value="" class="field" />

						onblur:
						<input id="onblur" name="onblur" type="text" value="" class="field" />

						onclick:
						<input id="onclick" name="onclick" type="text" value="" class="field" />

						ondblclick:
						<input id="ondblclick" name="ondblclick" type="text" value="" class="field" />

						onmousedown:
						<input id="onmousedown" name="onmousedown" type="text" value="" class="field" />

						onmouseup:
						<input id="onmouseup" name="onmouseup" type="text" value="" class="field" />

						onmouseover:
						<input id="onmouseover" name="onmouseover" type="text" value="" class="field" />

						onmousemove:
						<input id="onmousemove" name="onmousemove" type="text" value="" class="field" />

						onmouseout:
						<input id="onmouseout" name="onmouseout" type="text" value="" class="field" />

						onkeypress:
						<input id="onkeypress" name="onkeypress" type="text" value="" class="field" />

						onkeydown:
						<input id="onkeydown" name="onkeydown" type="text" value="" class="field" />

						onkeyup:
						<input id="onkeyup" name="onkeyup" type="text" value="" class="field" />

			</fieldset>

		<input type="submit" id="insert" name="insert" value="{#update}" />
		<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeIns();" style="display: none;" />
		<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />

</form>


code:
/**
 * abbr.js
 *
 * Copyright 2009, Moxiecode Systems AB
 * Released under LGPL License.
 *
 * License: http://tinymce.moxiecode.com/license
 * Contributing: http://tinymce.moxiecode.com/contributing
 */

function init() {
	SXE.initElementDialog('abbr');
	if (SXE.currentAction == "update") {
		SXE.showRemoveButton();
	}
}

function insertAbbr() {
	SXE.insertElement('abbr');
	tinyMCEPopup.close();
}

function removeAbbr() {
	SXE.removeElement('abbr');
	tinyMCEPopup.close();
}

tinyMCEPopup.onInit.add(init);


code:
/**
 * acronym.js
 *
 * Copyright 2009, Moxiecode Systems AB
 * Released under LGPL License.
 *
 * License: http://tinymce.moxiecode.com/license
 * Contributing: http://tinymce.moxiecode.com/contributing
 */

function init() {
	SXE.initElementDialog('acronym');
	if (SXE.currentAction == "update") {
		SXE.showRemoveButton();
	}
}

function insertAcronym() {
	SXE.insertElement('acronym');
	tinyMCEPopup.close();
}

function removeAcronym() {
	SXE.removeElement('acronym');
	tinyMCEPopup.close();
}

tinyMCEPopup.onInit.add(init);


code:
/**
 * attributes.js
 *
 * Copyright 2009, Moxiecode Systems AB
 * Released under LGPL License.
 *
 * License: http://tinymce.moxiecode.com/license
 * Contributing: http://tinymce.moxiecode.com/contributing
 */

function init() {
	tinyMCEPopup.resizeToInnerSize();
	var inst = tinyMCEPopup.editor;
	var dom = inst.dom;
	var elm = inst.selection.getNode();
	var f = document.forms[0];
	var onclick = dom.getAttrib(elm, 'onclick');

	setFormValue('title', dom.getAttrib(elm, 'title'));
	setFormValue('id', dom.getAttrib(elm, 'id'));
	setFormValue('style', dom.getAttrib(elm, "style"));
	setFormValue('dir', dom.getAttrib(elm, 'dir'));
	setFormValue('lang', dom.getAttrib(elm, 'lang'));
	setFormValue('tabindex', dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : ""));
	setFormValue('accesskey', dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : ""));
	setFormValue('onfocus', dom.getAttrib(elm, 'onfocus'));
	setFormValue('onblur', dom.getAttrib(elm, 'onblur'));
	setFormValue('onclick', onclick);
	setFormValue('ondblclick', dom.getAttrib(elm, 'ondblclick'));
	setFormValue('onmousedown', dom.getAttrib(elm, 'onmousedown'));
	setFormValue('onmouseup', dom.getAttrib(elm, 'onmouseup'));
	setFormValue('onmouseover', dom.getAttrib(elm, 'onmouseover'));
	setFormValue('onmousemove', dom.getAttrib(elm, 'onmousemove'));
	setFormValue('onmouseout', dom.getAttrib(elm, 'onmouseout'));
	setFormValue('onkeypress', dom.getAttrib(elm, 'onkeypress'));
	setFormValue('onkeydown', dom.getAttrib(elm, 'onkeydown'));
	setFormValue('onkeyup', dom.getAttrib(elm, 'onkeyup'));
	className = dom.getAttrib(elm, 'class');

	addClassesToList('classlist', 'advlink_styles');
	selectByValue(f, 'classlist', className, true);

	TinyMCE_EditableSelects.init();
}

function setFormValue(name, value) {
	if(value && document.forms[0].elements[name]){
		document.forms[0].elements[name].value = value;
	}
}

function insertAction() {
	var inst = tinyMCEPopup.editor;
	var elm = inst.selection.getNode();

	setAllAttribs(elm);
	tinyMCEPopup.execCommand("mceEndUndoLevel");
	tinyMCEPopup.close();
}

function setAttrib(elm, attrib, value) {
	var formObj = document.forms[0];
	var valueElm = formObj.elements[attrib.toLowerCase()];
	var inst = tinyMCEPopup.editor;
	var dom = inst.dom;

	if (typeof(value) == "undefined" || value == null) {
		value = "";

		if (valueElm)
			value = valueElm.value;
	}

	dom.setAttrib(elm, attrib.toLowerCase(), value);
}

function setAllAttribs(elm) {
	var f = document.forms[0];

	setAttrib(elm, 'title');
	setAttrib(elm, 'id');
	setAttrib(elm, 'style');
	setAttrib(elm, 'class', getSelectValue(f, 'classlist'));
	setAttrib(elm, 'dir');
	setAttrib(elm, 'lang');
	setAttrib(elm, 'tabindex');
	setAttrib(elm, 'accesskey');
	setAttrib(elm, 'onfocus');
	setAttrib(elm, 'onblur');
	setAttrib(elm, 'onclick');
	setAttrib(elm, 'ondblclick');
	setAttrib(elm, 'onmousedown');
	setAttrib(elm, 'onmouseup');
	setAttrib(elm, 'onmouseover');
	setAttrib(elm, 'onmousemove');
	setAttrib(elm, 'onmouseout');
	setAttrib(elm, 'onkeypress');
	setAttrib(elm, 'onkeydown');
	setAttrib(elm, 'onkeyup');

	// Refresh in old MSIE
//	if (tinyMCE.isMSIE5)
//		elm.outerHTML = elm.outerHTML;
}

function insertAttribute() {
	tinyMCEPopup.close();
}

tinyMCEPopup.onInit.add(init);
tinyMCEPopup.requireLangPack();


code:
/**
 * cite.js
 *
 * Copyright 2009, Moxiecode Systems AB
 * Released under LGPL License.
 *
 * License: http://tinymce.moxiecode.com/license
 * Contributing: http://tinymce.moxiecode.com/contributing
 */

function init() {
	SXE.initElementDialog('cite');
	if (SXE.currentAction == "update") {
		SXE.showRemoveButton();
	}
}

function insertCite() {
	SXE.insertElement('cite');
	tinyMCEPopup.close();
}

function removeCite() {
	SXE.removeElement('cite');
	tinyMCEPopup.close();
}

tinyMCEPopup.onInit.add(init);


code:
/**
 * del.js
 *
 * Copyright 2009, Moxiecode Systems AB
 * Released under LGPL License.
 *
 * License: http://tinymce.moxiecode.com/license
 * Contributing: http://tinymce.moxiecode.com/contributing
 */

function init() {
	SXE.initElementDialog('del');
	if (SXE.currentAction == "update") {
		setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime'));
		setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite'));
		SXE.showRemoveButton();
	}
}

function setElementAttribs(elm) {
	setAllCommonAttribs(elm);
	setAttrib(elm, 'datetime');
	setAttrib(elm, 'cite');
	elm.removeAttribute('data-mce-new');
}

function insertDel() {
	var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'DEL');

	if (elm == null) {
		var s = SXE.inst.selection.getContent();
		if(s.length > 0) {
			insertInlineElement('del');
			var elementArray = SXE.inst.dom.select('del[data-mce-new]');
			for (var i=0; i<elementArray.length; i++) {
				var elm = elementArray[i];
				setElementAttribs(elm);
			}
		}
	} else {
		setElementAttribs(elm);
	}
	tinyMCEPopup.editor.nodeChanged();
	tinyMCEPopup.execCommand('mceEndUndoLevel');
	tinyMCEPopup.close();
}

function removeDel() {
	SXE.removeElement('del');
	tinyMCEPopup.close();
}

tinyMCEPopup.onInit.add(init);


code:
/**
 * element_common.js
 *
 * Copyright 2009, Moxiecode Systems AB
 * Released under LGPL License.
 *
 * License: http://tinymce.moxiecode.com/license
 * Contributing: http://tinymce.moxiecode.com/contributing
 */

tinyMCEPopup.requireLangPack();

function initCommonAttributes(elm) {
	var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;

	// Setup form data for common element attributes
	setFormValue('title', dom.getAttrib(elm, 'title'));
	setFormValue('id', dom.getAttrib(elm, 'id'));
	selectByValue(formObj, 'class', dom.getAttrib(elm, 'class'), true);
	setFormValue('style', dom.getAttrib(elm, 'style'));
	selectByValue(formObj, 'dir', dom.getAttrib(elm, 'dir'));
	setFormValue('lang', dom.getAttrib(elm, 'lang'));
	setFormValue('onfocus', dom.getAttrib(elm, 'onfocus'));
	setFormValue('onblur', dom.getAttrib(elm, 'onblur'));
	setFormValue('onclick', dom.getAttrib(elm, 'onclick'));
	setFormValue('ondblclick', dom.getAttrib(elm, 'ondblclick'));
	setFormValue('onmousedown', dom.getAttrib(elm, 'onmousedown'));
	setFormValue('onmouseup', dom.getAttrib(elm, 'onmouseup'));
	setFormValue('onmouseover', dom.getAttrib(elm, 'onmouseover'));
	setFormValue('onmousemove', dom.getAttrib(elm, 'onmousemove'));
	setFormValue('onmouseout', dom.getAttrib(elm, 'onmouseout'));
	setFormValue('onkeypress', dom.getAttrib(elm, 'onkeypress'));
	setFormValue('onkeydown', dom.getAttrib(elm, 'onkeydown'));
	setFormValue('onkeyup', dom.getAttrib(elm, 'onkeyup'));
}

function setFormValue(name, value) {
	if(document.forms[0].elements[name]) document.forms[0].elements[name].value = value;
}

function insertDateTime(id) {
	document.getElementById(id).value = getDateTime(new Date(), "%Y-%m-%dT%H:%M:%S");
}

function getDateTime(d, fmt) {
	fmt = fmt.replace("%D", "%m/%d/%y");
	fmt = fmt.replace("%r", "%I:%M:%S %p");
	fmt = fmt.replace("%Y", "" + d.getFullYear());
	fmt = fmt.replace("%y", "" + d.getYear());
	fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2));
	fmt = fmt.replace("%d", addZeros(d.getDate(), 2));
	fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2));
	fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2));
	fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2));
	fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1));
	fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM"));
	fmt = fmt.replace("%%", "%");

	return fmt;
}

function addZeros(value, len) {
	var i;

	value = "" + value;

	if (value.length < len) {
		for (i=0; i<(len-value.length); i++)
			value = "0" + value;
	}

	return value;
}

function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
	if (!form_obj || !form_obj.elements[field_name])
		return;

	var sel = form_obj.elements[field_name];

	var found = false;
	for (var i=0; i<sel.options.length; i++) {
		var option = sel.options[i];

		if (option.value == value || (ignore_case && option.value.toLowerCase() == value.toLowerCase())) {
			option.selected = true;
			found = true;
		} else
			option.selected = false;
	}

	if (!found && add_custom && value != '') {
		var option = new Option('Value: ' + value, value);
		option.selected = true;
		sel.options[sel.options.length] = option;
	}

	return found;
}

function setAttrib(elm, attrib, value) {
	var formObj = document.forms[0];
	var valueElm = formObj.elements[attrib.toLowerCase()];
	tinyMCEPopup.editor.dom.setAttrib(elm, attrib, value || valueElm.value);
}

function setAllCommonAttribs(elm) {
	setAttrib(elm, 'title');
	setAttrib(elm, 'id');
	setAttrib(elm, 'class');
	setAttrib(elm, 'style');
	setAttrib(elm, 'dir');
	setAttrib(elm, 'lang');
	/*setAttrib(elm, 'onfocus');
	setAttrib(elm, 'onblur');
	setAttrib(elm, 'onclick');
	setAttrib(elm, 'ondblclick');
	setAttrib(elm, 'onmousedown');
	setAttrib(elm, 'onmouseup');
	setAttrib(elm, 'onmouseover');
	setAttrib(elm, 'onmousemove');
	setAttrib(elm, 'onmouseout');
	setAttrib(elm, 'onkeypress');
	setAttrib(elm, 'onkeydown');
	setAttrib(elm, 'onkeyup');*/
}

SXE = {
	currentAction : "insert",
	inst : tinyMCEPopup.editor,
	updateElement : null
}

SXE.focusElement = SXE.inst.selection.getNode();

SXE.initElementDialog = function(element_name) {
	addClassesToList('class', 'xhtmlxtras_styles');
	TinyMCE_EditableSelects.init();

	element_name = element_name.toLowerCase();
	var elm = SXE.inst.dom.getParent(SXE.focusElement, element_name.toUpperCase());
	if (elm != null && elm.nodeName.toUpperCase() == element_name.toUpperCase()) {
		SXE.currentAction = "update";
	}

	if (SXE.currentAction == "update") {
		initCommonAttributes(elm);
		SXE.updateElement = elm;
	}

	document.forms[0].insert.value = tinyMCEPopup.getLang(SXE.currentAction, 'Insert', true);
}

SXE.insertElement = function(element_name) {
	var elm = SXE.inst.dom.getParent(SXE.focusElement, element_name.toUpperCase()), h, tagName;

	if (elm == null) {
		var s = SXE.inst.selection.getContent();
		if(s.length > 0) {
			tagName = element_name;

			insertInlineElement(element_name);
			var elementArray = tinymce.grep(SXE.inst.dom.select(element_name));
			for (var i=0; i<elementArray.length; i++) {
				var elm = elementArray[i];

				if (SXE.inst.dom.getAttrib(elm, 'data-mce-new')) {
					elm.id = '';
					elm.setAttribute('id', '');
					elm.removeAttribute('id');
					elm.removeAttribute('data-mce-new');

					setAllCommonAttribs(elm);
				}
			}
		}
	} else {
		setAllCommonAttribs(elm);
	}
	SXE.inst.nodeChanged();
	tinyMCEPopup.execCommand('mceEndUndoLevel');
}

SXE.removeElement = function(element_name){
	element_name = element_name.toLowerCase();
	elm = SXE.inst.dom.getParent(SXE.focusElement, element_name.toUpperCase());
	if(elm && elm.nodeName.toUpperCase() == element_name.toUpperCase()){
		tinyMCE.execCommand('mceRemoveNode', false, elm);
		SXE.inst.nodeChanged();
		tinyMCEPopup.execCommand('mceEndUndoLevel');
	}
}

SXE.showRemoveButton = function() {
		document.getElementById("remove").style.display = '';
}

SXE.containsClass = function(elm,cl) {
	return (elm.className.indexOf(cl) > -1) ? true : false;
}

SXE.removeClass = function(elm,cl) {
	if(elm.className == null || elm.className == "" || !SXE.containsClass(elm,cl)) {
		return true;
	}
	var classNames = elm.className.split(" ");
	var newClassNames = "";
	for (var x = 0, cnl = classNames.length; x < cnl; x++) {
		if (classNames[x] != cl) {
			newClassNames += (classNames[x] + " ");
		}
	}
	elm.className = newClassNames.substring(0,newClassNames.length-1); //removes extra space at the end
}

SXE.addClass = function(elm,cl) {
	if(!SXE.containsClass(elm,cl)) elm.className ? elm.className += " " + cl : elm.className = cl;
	return true;
}

function insertInlineElement(en) {
	var ed = tinyMCEPopup.editor, dom = ed.dom;

	ed.getDoc().execCommand('FontName', false, 'mceinline');
	tinymce.each(dom.select('span,font'), function(n) {
		if (n.style.fontFamily == 'mceinline' || n.face == 'mceinline')
			dom.replace(dom.create(en, {'data-mce-new' : 1}), n, 1);
	});
}


code:
/**
 * ins.js
 *
 * Copyright 2009, Moxiecode Systems AB
 * Released under LGPL License.
 *
 * License: http://tinymce.moxiecode.com/license
 * Contributing: http://tinymce.moxiecode.com/contributing
 */

function init() {
	SXE.initElementDialog('ins');
	if (SXE.currentAction == "update") {
		setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime'));
		setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite'));
		SXE.showRemoveButton();
	}
}

function setElementAttribs(elm) {
	setAllCommonAttribs(elm);
	setAttrib(elm, 'datetime');
	setAttrib(elm, 'cite');
	elm.removeAttribute('data-mce-new');
}

function insertIns() {
	var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'INS');

	if (elm == null) {
		var s = SXE.inst.selection.getContent();
		if(s.length > 0) {
			insertInlineElement('ins');
			var elementArray = SXE.inst.dom.select('ins[data-mce-new]');
			for (var i=0; i<elementArray.length; i++) {
				var elm = elementArray[i];
				setElementAttribs(elm);
			}
		}
	} else {
		setElementAttribs(elm);
	}
	tinyMCEPopup.editor.nodeChanged();
	tinyMCEPopup.execCommand('mceEndUndoLevel');
	tinyMCEPopup.close();
}

function removeIns() {
	SXE.removeElement('ins');
	tinyMCEPopup.close();
}

tinyMCEPopup.onInit.add(init);


code:
tinyMCE.addI18n('en.xhtmlxtras_dlg',{
attribute_label_title:"Title",
attribute_label_id:"ID",
attribute_label_class:"Class",
attribute_label_style:"Style",
attribute_label_cite:"Cite",
attribute_label_datetime:"Date/Time",
attribute_label_langdir:"Text Direction",
attribute_option_ltr:"Left to right",
attribute_option_rtl:"Right to left",
attribute_label_langcode:"Language",
attribute_label_tabindex:"TabIndex",
attribute_label_accesskey:"AccessKey",
attribute_events_tab:"Events",
attribute_attrib_tab:"Attributes",
general_tab:"General",
attrib_tab:"Attributes",
events_tab:"Events",
fieldset_general_tab:"General Settings",
fieldset_attrib_tab:"Element Attributes",
fieldset_events_tab:"Element Events",
title_ins_element:"Insertion Element",
title_del_element:"Deletion Element",
title_acronym_element:"Acronym Element",
title_abbr_element:"Abbreviation Element",
title_cite_element:"Citation Element",
remove:"Remove",
insert_date:"Insert current date/time",
option_ltr:"Left to right",
option_rtl:"Right to left",
attribs_title:"Insert/Edit Attributes"
});


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

	<title>{#advanced_dlg.about_title}</title>

{#advanced_dlg.about_general}

{#advanced_dlg.about_help}

{#advanced_dlg.about_plugins}

{#advanced_dlg.about_title}

Version:  ()

TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL
				by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.

Copyright © 2003-2008, Moxiecode Systems AB, All rights reserved.

For more information about this software visit the TinyMCE website.

{#advanced_dlg.about_loaded}

			<input type="button" id="cancel" name="cancel" value="{#close}" onclick="tinyMCEPopup.close();" />


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

	<title>{#advanced_dlg.anchor_title}</title>

<form onsubmit="AnchorDialog.update();return false;" action="#">

			{#advanced_dlg.anchor_title}

			{#advanced_dlg.anchor_name}:
			<input name="anchorName" type="text" class="mceFocus" id="anchorName" value="" style="width: 200px" aria-required="true" />

		<input type="submit" id="insert" name="insert" value="{#update}" />
		<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />

</form>


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

	<title>{#advanced_dlg.charmap_title}</title>

		{#advanced_dlg.charmap_title}

					HTML-Code

					NUM-Code


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

	<title>{#advanced_dlg.colorpicker_title}</title>

	{#advanced_dlg.colorpicker_title}
<form onsubmit="insertAction();return false" action="#">

{#advanced_dlg.colorpicker_picker_tab}

{#advanced_dlg.colorpicker_palette_tab}

{#advanced_dlg.colorpicker_named_tab}

			<fieldset>
				<legend>{#advanced_dlg.colorpicker_picker_title}</legend>

			</fieldset>

			<fieldset>
				<legend id="webcolors_title">{#advanced_dlg.colorpicker_palette_title}</legend>

			</fieldset>

			<fieldset id="named_picker_label">
				<legend id="named_title">{#advanced_dlg.colorpicker_named_title}</legend>

					{#advanced_dlg.colorpicker_name}

			</fieldset>

		<input type="submit" id="insert" name="insert" value="{#apply}" />

			{#advanced_dlg.colorpicker_color} <input id="color" type="text" size="8" class="text mceFocus" aria-required="true" />

</form>