Update TinyMCE to 3.5.3, enable stripping of Word styles on paste

This commit is contained in:
grahamtriggs 2015-10-14 22:17:16 +01:00
parent 83404c2c80
commit 48790b7525
274 changed files with 25268 additions and 14504 deletions

25
webapp/web/js/tiny_mce/plugins/xhtmlxtras/abbr.htm vendored Executable file → Normal file
View file

@ -9,13 +9,13 @@
<script type="text/javascript" src="js/element_common.js"></script>
<script type="text/javascript" src="js/abbr.js"></script>
<link rel="stylesheet" type="text/css" href="css/popup.css" />
<base target="_self" />
</head>
<body style="display: none">
<body style="display: none" role="application" aria-labelledby="app_title">
<span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_abbr_element}</span>
<form onsubmit="insertAbbr();return false;" action="#">
<div class="tabs">
<ul>
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
<!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
</ul>
</div>
@ -24,7 +24,7 @@
<div id="general_panel" class="panel current">
<fieldset>
<legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
<table border="0" cellpadding="0" cellspacing="4">
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
<tr>
<td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
<td><input id="title" name="title" type="text" value="" class="field mceFocus" /></td>
@ -42,7 +42,7 @@
</td>
</tr>
<tr>
<td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
<td class="label"><label id="stylelabel" for="style">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
<td><input id="style" name="style" type="text" value="" class="field" /></td>
</tr>
<tr>
@ -68,7 +68,7 @@
<fieldset>
<legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
<table border="0" cellpadding="0" cellspacing="4">
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
<tr>
<td class="label"><label for="onfocus">onfocus</label>:</td>
<td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
@ -133,17 +133,10 @@
</div>
</div>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="{#update}" />
</div>
<div style="float: left">
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeAbbr();" style="display: none;" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<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();" />
</div>
</form>
</body>
</html>

25
webapp/web/js/tiny_mce/plugins/xhtmlxtras/acronym.htm vendored Executable file → Normal file
View file

@ -9,13 +9,13 @@
<script type="text/javascript" src="js/element_common.js"></script>
<script type="text/javascript" src="js/acronym.js"></script>
<link rel="stylesheet" type="text/css" href="css/popup.css" />
<base target="_self" />
</head>
<body style="display: none">
<body style="display: none" role="application" aria-labelledby="app_title">
<span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_acronym_element}</span>
<form onsubmit="insertAcronym();return false;" action="#">
<div class="tabs">
<ul>
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
<!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
</ul>
</div>
@ -24,7 +24,7 @@
<div id="general_panel" class="panel current">
<fieldset>
<legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
<table border="0" cellpadding="0" cellspacing="4">
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
<tr>
<td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
<td><input id="title" name="title" type="text" value="" class="field mceFocus" /></td>
@ -42,7 +42,7 @@
</td>
</tr>
<tr>
<td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
<td class="label"><label id="stylelabel" for="style">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
<td><input id="style" name="style" type="text" value="" class="field" /></td>
</tr>
<tr>
@ -68,7 +68,7 @@
<fieldset>
<legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
<table border="0" cellpadding="0" cellspacing="4">
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
<tr>
<td class="label"><label for="onfocus">onfocus</label>:</td>
<td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
@ -133,17 +133,10 @@
</div>
</div>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="{#update}" />
</div>
<div style="float: left">
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeAcronym();" style="display: none;" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<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();" />
</div>
</form>
</body>
</html>

25
webapp/web/js/tiny_mce/plugins/xhtmlxtras/attributes.htm vendored Executable file → Normal file
View file

@ -8,14 +8,14 @@
<script type="text/javascript" src="../../utils/form_utils.js"></script>
<script type="text/javascript" src="js/attributes.js"></script>
<link rel="stylesheet" type="text/css" href="css/attributes.css" />
<base target="_self" />
</head>
<body style="display: none">
<body style="display: none" role="application" aria-labelledby="app_title">
<span style="display:none;" id="app_title">{#xhtmlxtras_dlg.attribs_title}</span>
<form onsubmit="insertAction();return false;" action="#">
<div class="tabs">
<ul>
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.attribute_attrib_tab}</a></span></li>
<li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.attribute_events_tab}</a></span></li>
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.attribute_attrib_tab}</a></span></li>
<li id="events_tab" aria-controls="events_panel"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.attribute_events_tab}</a></span></li>
</ul>
</div>
@ -23,7 +23,7 @@
<div id="general_panel" class="panel current">
<fieldset>
<legend>{#xhtmlxtras_dlg.attribute_attrib_tab}</legend>
<table border="0" cellpadding="0" cellspacing="4">
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
<tr>
<td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
<td><input id="title" name="title" type="text" value="" class="mceFocus" /></td>
@ -36,12 +36,12 @@
<td><label id="classlabel" for="classlist">{#class_name}</label></td>
<td>
<select id="classlist" name="classlist" class="mceEditableSelect">
<option value="" selected>{#not_set}</option>
<option value="" selected="selected">{#not_set}</option>
</select>
</td>
</tr>
<tr>
<td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
<td class="label"><label id="stylelabel" for="style">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
<td><input id="style" name="style" type="text" value="" /></td>
</tr>
<tr>
@ -76,7 +76,7 @@
<fieldset>
<legend>{#xhtmlxtras_dlg.attribute_events_tab}</legend>
<table border="0" cellpadding="0" cellspacing="4">
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
<tr>
<td class="label"><label for="onfocus">onfocus</label>:</td>
<td><input id="onfocus" name="onfocus" type="text" value="" /></td>
@ -141,14 +141,9 @@
</div>
</div>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="{#insert}" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<input type="submit" id="insert" name="insert" value="{#insert}" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>
</html>

23
webapp/web/js/tiny_mce/plugins/xhtmlxtras/cite.htm vendored Executable file → Normal file
View file

@ -9,13 +9,13 @@
<script type="text/javascript" src="js/element_common.js"></script>
<script type="text/javascript" src="js/cite.js"></script>
<link rel="stylesheet" type="text/css" href="css/popup.css" />
<base target="_self" />
</head>
<body style="display: none">
<body style="display: none" role="application" aria-labelledby="app_title">
<span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_cite_element}</span>
<form onsubmit="insertCite();return false;" action="#">
<div class="tabs">
<ul>
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
<!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
</ul>
</div>
@ -24,7 +24,7 @@
<div id="general_panel" class="panel current">
<fieldset>
<legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
<table border="0" cellpadding="0" cellspacing="4">
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
<tr>
<td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
<td><input id="title" name="title" type="text" value="" class="field mceFocus" /></td>
@ -68,7 +68,7 @@
<fieldset>
<legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
<table border="0" cellpadding="0" cellspacing="4">
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
<tr>
<td class="label"><label for="onfocus">onfocus</label>:</td>
<td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
@ -133,17 +133,10 @@
</div>
</div>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="{#update}" />
</div>
<div style="float: left">
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeCite();" style="display: none;" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<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();" />
</div>
</form>
</body>
</html>

0
webapp/web/js/tiny_mce/plugins/xhtmlxtras/css/attributes.css vendored Executable file → Normal file
View file

0
webapp/web/js/tiny_mce/plugins/xhtmlxtras/css/popup.css vendored Executable file → Normal file
View file

32
webapp/web/js/tiny_mce/plugins/xhtmlxtras/del.htm vendored Executable file → Normal file
View file

@ -9,13 +9,13 @@
<script type="text/javascript" src="js/element_common.js"></script>
<script type="text/javascript" src="js/del.js"></script>
<link rel="stylesheet" type="text/css" href="css/popup.css" />
<base target="_self" />
</head>
<body id="xhtmlxtrasins" style="display: none">
<body id="xhtmlxtrasins" style="display: none" role="application" aria-labelledby="app_title">
<span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_del_element}</span>
<form onsubmit="insertDel();return false;" action="#">
<div class="tabs">
<ul>
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
<!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
</ul>
</div>
@ -24,14 +24,14 @@
<div id="general_panel" class="panel current">
<fieldset>
<legend>{#xhtmlxtras_dlg.fieldset_general_tab}</legend>
<table border="0" cellpadding="0" cellspacing="4">
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
<tr>
<td class="label"><label id="datetimelabel" for="datetime">{#xhtmlxtras_dlg.attribute_label_datetime}</label>:</td>
<td>
<table border="0" cellspacing="0" cellpadding="0">
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input id="datetime" name="datetime" type="text" value="" maxlength="19" class="field mceFocus" /></td>
<td><a href="javascript:insertDateTime('datetime');" onmousedown="return false;" class="browse"><span class="datetime" alt="{#xhtmlxtras_dlg.insert_date}" title="{#xhtmlxtras_dlg.insert_date}"></span></a></td>
<td><a href="javascript:insertDateTime('datetime');" onmousedown="return false;" class="browse" role="button" aria-labelledby="datetimelabel"><span class="datetime" title="{#xhtmlxtras_dlg.insert_date}"></span></a></td>
</tr>
</table>
</td>
@ -44,7 +44,7 @@
</fieldset>
<fieldset>
<legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
<table border="0" cellpadding="0" cellspacing="4">
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
<tr>
<td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
<td><input id="title" name="title" type="text" value="" class="field" /></td>
@ -62,7 +62,7 @@
</td>
</tr>
<tr>
<td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
<td class="label"><label id="stylelabel" for="style">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
<td><input id="style" name="style" type="text" value="" class="field" /></td>
</tr>
<tr>
@ -88,7 +88,7 @@
<fieldset>
<legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
<table border="0" cellpadding="0" cellspacing="4">
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
<tr>
<td class="label"><label for="onfocus">onfocus</label>:</td>
<td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
@ -153,18 +153,10 @@
</div>
</div>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="{#update}" />
</div>
<div style="float: left">
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeDel();" style="display: none;" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<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();" />
</div>
</form>
</body>
</html>

2
webapp/web/js/tiny_mce/plugins/xhtmlxtras/editor_plugin.js vendored Executable file → Normal file
View file

@ -1 +1 @@
(function(){tinymce.create('tinymce.plugins.XHTMLXtrasPlugin',{init:function(ed,url){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_width',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_width',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_width',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_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceAttributes',function(){ed.windowManager.open({file:url+'/attributes.htm',width:380,height:370,inline:1},{plugin_url:url});});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'});if(tinymce.isIE){function fix(ed,o){if(o.set){o.content=o.content.replace(/<abbr([^>]+)>/gi,'<html:abbr $1>');o.content=o.content.replace(/<\/abbr>/gi,'</html:abbr>');}};ed.onBeforeSetContent.add(fix);ed.onPostProcess.add(fix);}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');if(n){cm.setDisabled(n.nodeName.toLowerCase(),0);cm.setActive(n.nodeName.toLowerCase(),1);}else{cm.setActive('cite',0);cm.setActive('acronym',0);cm.setActive('abbr',0);cm.setActive('del',0);cm.setActive('ins',0);}});},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};}});tinymce.PluginManager.add('xhtmlxtras',tinymce.plugins.XHTMLXtrasPlugin);})();
(function(){tinymce.create("tinymce.plugins.XHTMLXtrasPlugin",{init:function(a,b){a.addCommand("mceCite",function(){a.windowManager.open({file:b+"/cite.htm",width:350+parseInt(a.getLang("xhtmlxtras.cite_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.cite_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAcronym",function(){a.windowManager.open({file:b+"/acronym.htm",width:350+parseInt(a.getLang("xhtmlxtras.acronym_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.acronym_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAbbr",function(){a.windowManager.open({file:b+"/abbr.htm",width:350+parseInt(a.getLang("xhtmlxtras.abbr_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.abbr_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceDel",function(){a.windowManager.open({file:b+"/del.htm",width:340+parseInt(a.getLang("xhtmlxtras.del_delta_width",0)),height:310+parseInt(a.getLang("xhtmlxtras.del_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceIns",function(){a.windowManager.open({file:b+"/ins.htm",width:340+parseInt(a.getLang("xhtmlxtras.ins_delta_width",0)),height:310+parseInt(a.getLang("xhtmlxtras.ins_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAttributes",function(){a.windowManager.open({file:b+"/attributes.htm",width:380+parseInt(a.getLang("xhtmlxtras.attr_delta_width",0)),height:370+parseInt(a.getLang("xhtmlxtras.attr_delta_height",0)),inline:1},{plugin_url:b})});a.addButton("cite",{title:"xhtmlxtras.cite_desc",cmd:"mceCite"});a.addButton("acronym",{title:"xhtmlxtras.acronym_desc",cmd:"mceAcronym"});a.addButton("abbr",{title:"xhtmlxtras.abbr_desc",cmd:"mceAbbr"});a.addButton("del",{title:"xhtmlxtras.del_desc",cmd:"mceDel"});a.addButton("ins",{title:"xhtmlxtras.ins_desc",cmd:"mceIns"});a.addButton("attribs",{title:"xhtmlxtras.attribs_desc",cmd:"mceAttributes"});a.onNodeChange.add(function(d,c,f,e){f=d.dom.getParent(f,"CITE,ACRONYM,ABBR,DEL,INS");c.setDisabled("cite",e);c.setDisabled("acronym",e);c.setDisabled("abbr",e);c.setDisabled("del",e);c.setDisabled("ins",e);c.setDisabled("attribs",f&&f.nodeName=="BODY");c.setActive("cite",0);c.setActive("acronym",0);c.setActive("abbr",0);c.setActive("del",0);c.setActive("ins",0);if(f){do{c.setDisabled(f.nodeName.toLowerCase(),0);c.setActive(f.nodeName.toLowerCase(),1)}while(f=f.parentNode)}});a.onPreInit.add(function(){a.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}}});tinymce.PluginManager.add("xhtmlxtras",tinymce.plugins.XHTMLXtrasPlugin)})();

56
webapp/web/js/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js vendored Executable file → Normal file
View file

@ -1,8 +1,11 @@
/**
* $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
* editor_plugin_src.js
*
* @author Moxiecode
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
(function() {
@ -24,7 +27,7 @@
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_width', 0)),
height : 250 + parseInt(ed.getLang('xhtmlxtras.acronym_delta_height', 0)),
inline : 1
}, {
plugin_url : url
@ -35,7 +38,7 @@
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_width', 0)),
height : 250 + parseInt(ed.getLang('xhtmlxtras.abbr_delta_height', 0)),
inline : 1
}, {
plugin_url : url
@ -46,7 +49,7 @@
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_width', 0)),
height : 310 + parseInt(ed.getLang('xhtmlxtras.del_delta_height', 0)),
inline : 1
}, {
plugin_url : url
@ -57,7 +60,7 @@
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_width', 0)),
height : 310 + parseInt(ed.getLang('xhtmlxtras.ins_delta_height', 0)),
inline : 1
}, {
plugin_url : url
@ -67,8 +70,8 @@
ed.addCommand('mceAttributes', function() {
ed.windowManager.open({
file : url + '/attributes.htm',
width : 380,
height : 370,
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
@ -83,18 +86,6 @@
ed.addButton('ins', {title : 'xhtmlxtras.ins_desc', cmd : 'mceIns'});
ed.addButton('attribs', {title : 'xhtmlxtras.attribs_desc', cmd : 'mceAttributes'});
if (tinymce.isIE) {
function fix(ed, o) {
if (o.set) {
o.content = o.content.replace(/<abbr([^>]+)>/gi, '<html:abbr $1>');
o.content = o.content.replace(/<\/abbr>/gi, '</html:abbr>');
}
};
ed.onBeforeSetContent.add(fix);
ed.onPostProcess.add(fix);
}
ed.onNodeChange.add(function(ed, cm, n, co) {
n = ed.dom.getParent(n, 'CITE,ACRONYM,ABBR,DEL,INS');
@ -104,18 +95,25 @@
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) {
cm.setDisabled(n.nodeName.toLowerCase(), 0);
cm.setActive(n.nodeName.toLowerCase(), 1);
} else {
cm.setActive('cite', 0);
cm.setActive('acronym', 0);
cm.setActive('abbr', 0);
cm.setActive('del', 0);
cm.setActive('ins', 0);
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() {

36
webapp/web/js/tiny_mce/plugins/xhtmlxtras/ins.htm vendored Executable file → Normal file
View file

@ -9,13 +9,13 @@
<script type="text/javascript" src="js/element_common.js"></script>
<script type="text/javascript" src="js/ins.js"></script>
<link rel="stylesheet" type="text/css" href="css/popup.css" />
<base target="_self" />
</head>
<body id="xhtmlxtrasins" style="display: none">
<body id="xhtmlxtrasins" style="display: none" role="application" aria-labelledby="app_title">
<span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_ins_element}</span>
<form onsubmit="insertIns();return false;" action="#">
<div class="tabs">
<ul>
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
<!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
</ul>
</div>
@ -24,19 +24,19 @@
<div id="general_panel" class="panel current">
<fieldset>
<legend>{#xhtmlxtras_dlg.fieldset_general_tab}</legend>
<table border="0" cellpadding="0" cellspacing="4">
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
<tr>
<td class="label"><label id="datetimelabel" for="datetime">{#xhtmlxtras_dlg.attribute_label_datetime}</label>:</td>
<td>
<table border="0" cellspacing="0" cellpadding="0">
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input id="datetime" name="datetime" type="text" value="" maxlength="19" class="field mceFocus" /></td>
<td><a href="javascript:insertDateTime('datetime');" onmousedown="return false;" class="browse"><span class="datetime" alt="{#xhtmlxtras_dlg.insert_date}" title="{#xhtmlxtras_dlg.insert_date}"></span></a></td>
<td ><a href="javascript:insertDateTime('datetime');" onmousedown="return false;" class="browse" role="button" aria-labelledby="datetimelabel"><span class="datetime" title="{#xhtmlxtras_dlg.insert_date}"></span></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<tr >
<td class="label"><label id="citelabel" for="cite">{#xhtmlxtras_dlg.attribute_label_cite}</label>:</td>
<td><input id="cite" name="cite" type="text" value="" class="field" /></td>
</tr>
@ -44,9 +44,9 @@
</fieldset>
<fieldset>
<legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
<table border="0" cellpadding="0" cellspacing="4">
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
<tr>
<td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
<td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
<td><input id="title" name="title" type="text" value="" class="field" /></td>
</tr>
<tr>
@ -62,7 +62,7 @@
</td>
</tr>
<tr>
<td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
<td class="label"><label id="stylelabel" for="style">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
<td><input id="style" name="style" type="text" value="" class="field" /></td>
</tr>
<tr>
@ -88,7 +88,7 @@
<fieldset>
<legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
<table border="0" cellpadding="0" cellspacing="4">
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
<tr>
<td class="label"><label for="onfocus">onfocus</label>:</td>
<td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
@ -153,18 +153,10 @@
</div>
</div>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="{#update}" />
</div>
<div style="float: left">
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeIns();" style="display: none;" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<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();" />
</div>
</form>
</body>
</html>

13
webapp/web/js/tiny_mce/plugins/xhtmlxtras/js/abbr.js vendored Executable file → Normal file
View file

@ -1,8 +1,11 @@
/**
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
/**
* abbr.js
*
* @author Moxiecode - based on work by Andrew Tetlaw
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
function init() {
@ -13,7 +16,7 @@ function init() {
}
function insertAbbr() {
SXE.insertElement(tinymce.isIE ? 'html:abbr' : 'abbr');
SXE.insertElement('abbr');
tinyMCEPopup.close();
}

11
webapp/web/js/tiny_mce/plugins/xhtmlxtras/js/acronym.js vendored Executable file → Normal file
View file

@ -1,8 +1,11 @@
/**
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
/**
* acronym.js
*
* @author Moxiecode - based on work by Andrew Tetlaw
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
function init() {

28
webapp/web/js/tiny_mce/plugins/xhtmlxtras/js/attributes.js vendored Executable file → Normal file
View file

@ -1,8 +1,11 @@
/**
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
/**
* attributes.js
*
* @author Moxiecode - based on work by Andrew Tetlaw
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
function init() {
@ -50,7 +53,6 @@ function insertAction() {
var inst = tinyMCEPopup.editor;
var elm = inst.selection.getNode();
tinyMCEPopup.execCommand("mceBeginUndoLevel");
setAllAttribs(elm);
tinyMCEPopup.execCommand("mceEndUndoLevel");
tinyMCEPopup.close();
@ -69,21 +71,7 @@ function setAttrib(elm, attrib, value) {
value = valueElm.value;
}
if (value != "") {
dom.setAttrib(elm, attrib.toLowerCase(), value);
if (attrib == "style")
attrib = "style.cssText";
if (attrib.substring(0, 2) == 'on')
value = 'return true;' + value;
if (attrib == "class")
attrib = "className";
elm[attrib]=value;
} else
elm.removeAttribute(attrib);
dom.setAttrib(elm, attrib.toLowerCase(), value);
}
function setAllAttribs(elm) {

11
webapp/web/js/tiny_mce/plugins/xhtmlxtras/js/cite.js vendored Executable file → Normal file
View file

@ -1,8 +1,11 @@
/**
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
/**
* cite.js
*
* @author Moxiecode - based on work by Andrew Tetlaw
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
function init() {

17
webapp/web/js/tiny_mce/plugins/xhtmlxtras/js/del.js vendored Executable file → Normal file
View file

@ -1,8 +1,11 @@
/**
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
/**
* del.js
*
* @author Moxiecode - based on work by Andrew Tetlaw
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
function init() {
@ -18,17 +21,17 @@ 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');
tinyMCEPopup.execCommand('mceBeginUndoLevel');
if (elm == null) {
var s = SXE.inst.selection.getContent();
if(s.length > 0) {
tinyMCEPopup.execCommand('mceInsertContent', false, '<del id="#sxe_temp_del#">' + s + '</del>');
var elementArray = tinymce.grep(SXE.inst.dom.select('del'), function(n) {return n.id == '#sxe_temp_del#';});
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);

48
webapp/web/js/tiny_mce/plugins/xhtmlxtras/js/element_common.js vendored Executable file → Normal file
View file

@ -1,8 +1,11 @@
/**
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
/**
* element_common.js
*
* @author Moxiecode - based on work by Andrew Tetlaw
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
tinyMCEPopup.requireLangPack();
@ -151,28 +154,24 @@ SXE.initElementDialog = function(element_name) {
SXE.insertElement = function(element_name) {
var elm = SXE.inst.dom.getParent(SXE.focusElement, element_name.toUpperCase()), h, tagName;
tinyMCEPopup.execCommand('mceBeginUndoLevel');
if (elm == null) {
var s = SXE.inst.selection.getContent();
if(s.length > 0) {
tagName = element_name;
if (tinymce.isIE && element_name.indexOf('html:') == 0)
element_name = element_name.substring(5).toLowerCase();
h = '<' + tagName + ' id="#sxe_temp_' + element_name + '#">' + s + '</' + tagName + '>';
tinyMCEPopup.execCommand('mceInsertContent', false, h);
var elementArray = tinymce.grep(SXE.inst.dom.select(element_name), function(n) {return n.id == '#sxe_temp_' + 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];
elm.id = '';
elm.setAttribute('id', '');
elm.removeAttribute('id');
if (SXE.inst.dom.getAttrib(elm, 'data-mce-new')) {
elm.id = '';
elm.setAttribute('id', '');
elm.removeAttribute('id');
elm.removeAttribute('data-mce-new');
setAllCommonAttribs(elm);
setAllCommonAttribs(elm);
}
}
}
} else {
@ -186,7 +185,6 @@ 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()){
tinyMCEPopup.execCommand('mceBeginUndoLevel');
tinyMCE.execCommand('mceRemoveNode', false, elm);
SXE.inst.nodeChanged();
tinyMCEPopup.execCommand('mceEndUndoLevel');
@ -194,7 +192,7 @@ SXE.removeElement = function(element_name){
}
SXE.showRemoveButton = function() {
document.getElementById("remove").style.display = 'block';
document.getElementById("remove").style.display = '';
}
SXE.containsClass = function(elm,cl) {
@ -218,4 +216,14 @@ SXE.removeClass = function(elm,cl) {
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);
});
}

18
webapp/web/js/tiny_mce/plugins/xhtmlxtras/js/ins.js vendored Executable file → Normal file
View file

@ -1,8 +1,11 @@
/**
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
/**
* ins.js
*
* @author Moxiecode - based on work by Andrew Tetlaw
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
function init() {
@ -18,16 +21,17 @@ 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');
tinyMCEPopup.execCommand('mceBeginUndoLevel');
if (elm == null) {
var s = SXE.inst.selection.getContent();
if(s.length > 0) {
tinyMCEPopup.execCommand('mceInsertContent', false, '<ins id="#sxe_temp_ins#">' + s + '</ins>');
var elementArray = tinymce.grep(SXE.inst.dom.select('ins'), function(n) {return n.id == '#sxe_temp_ins#';});
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);

33
webapp/web/js/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js vendored Executable file → Normal file
View file

@ -1,32 +1 @@
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"
});
tinyMCE.addI18n('en.xhtmlxtras_dlg',{"attribs_title":"Insert/Edit Attributes","option_rtl":"Right to Left","option_ltr":"Left to Right","insert_date":"Insert Current Date/Time",remove:"Remove","title_cite_element":"Citation Element","title_abbr_element":"Abbreviation Element","title_acronym_element":"Acronym Element","title_del_element":"Deletion Element","title_ins_element":"Insertion Element","fieldset_events_tab":"Element Events","fieldset_attrib_tab":"Element Attributes","fieldset_general_tab":"General Settings","events_tab":"Events","attrib_tab":"Attributes","general_tab":"General","attribute_attrib_tab":"Attributes","attribute_events_tab":"Events","attribute_label_accesskey":"AccessKey","attribute_label_tabindex":"TabIndex","attribute_label_langcode":"Language","attribute_option_rtl":"Right to Left","attribute_option_ltr":"Left to Right","attribute_label_langdir":"Text Direction","attribute_label_datetime":"Date/Time","attribute_label_cite":"Cite","attribute_label_style":"Style","attribute_label_class":"Class","attribute_label_id":"ID","attribute_label_title":"Title"});