1 function saveContent() {
\r
2 tinyMCE.setContent(document.getElementById('htmlSource').value);
\r
3 tinyMCE.closeWindow(window);
\r
6 // Fixes some charcode issues
\r
7 function fixContent(html) {
\r
8 html = html.replace(new RegExp('<(p|hr|table|tr|td|ol|ul|object|embed|li|blockquote)', 'gi'),'\n<$1');
\r
9 html = html.replace(new RegExp('<\/(p|ol|ul|li|table|tr|td|blockquote|object)>', 'gi'),'</$1>\n');
\r
10 html = tinyMCE.regexpReplace(html, '<br />','<br />\n','gi');
\r
11 html = tinyMCE.regexpReplace(html, '\n\n','\n','gi');
\r
15 function onLoadInit() {
\r
16 tinyMCEPopup.resizeToInnerSize();
\r
18 document.forms[0].htmlSource.value = fixContent(tinyMCE.getContent(tinyMCE.getWindowArg('editor_id')));
\r
23 function setWrap(val) {
\r
25 document.forms[0].htmlSource.wrap = val;
\r
28 function toggleWordWrap(elm) {
\r
35 var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
\r
37 function resizeInputs() {
\r
38 if (!tinyMCE.isMSIE) {
\r
39 wHeight = self.innerHeight-80;
\r
40 wWidth = self.innerWidth-16;
\r
42 wHeight = document.body.clientHeight - 80;
\r
43 wWidth = document.body.clientWidth - 16;
\r
46 document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px';
\r
47 document.forms[0].htmlSource.style.width = Math.abs(wWidth) + 'px';
\r
50 function renderWordWrap() {
\r
52 document.write('<input type="checkbox" name="wraped" id="wraped" onclick="toggleWordWrap(this);" class="wordWrapCode" /><label for="wraped">{$lang_theme_code_wordwrap}</label>');
\r