bgneal@45: tinyMCEPopup.requireLangPack(); bgneal@45: bgneal@45: var doc; bgneal@45: bgneal@45: var defaultDocTypes = bgneal@45: 'XHTML 1.0 Transitional=,' + bgneal@45: 'XHTML 1.0 Frameset=,' + bgneal@45: 'XHTML 1.0 Strict=,' + bgneal@45: 'XHTML 1.1=,' + bgneal@45: 'HTML 4.01 Transitional=,' + bgneal@45: 'HTML 4.01 Strict=,' + bgneal@45: 'HTML 4.01 Frameset='; bgneal@45: bgneal@45: var defaultEncodings = bgneal@45: 'Western european (iso-8859-1)=iso-8859-1,' + bgneal@45: 'Central European (iso-8859-2)=iso-8859-2,' + bgneal@45: 'Unicode (UTF-8)=utf-8,' + bgneal@45: 'Chinese traditional (Big5)=big5,' + bgneal@45: 'Cyrillic (iso-8859-5)=iso-8859-5,' + bgneal@45: 'Japanese (iso-2022-jp)=iso-2022-jp,' + bgneal@45: 'Greek (iso-8859-7)=iso-8859-7,' + bgneal@45: 'Korean (iso-2022-kr)=iso-2022-kr,' + bgneal@45: 'ASCII (us-ascii)=us-ascii'; bgneal@45: bgneal@45: var defaultMediaTypes = bgneal@45: 'all=all,' + bgneal@45: 'screen=screen,' + bgneal@45: 'print=print,' + bgneal@45: 'tty=tty,' + bgneal@45: 'tv=tv,' + bgneal@45: 'projection=projection,' + bgneal@45: 'handheld=handheld,' + bgneal@45: 'braille=braille,' + bgneal@45: 'aural=aural'; bgneal@45: bgneal@45: var defaultFontNames = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings'; bgneal@45: var defaultFontSizes = '10px,11px,12px,13px,14px,15px,16px'; bgneal@45: bgneal@45: function init() { bgneal@45: var f = document.forms['fullpage'], el = f.elements, e, i, p, doctypes, encodings, mediaTypes, fonts, ed = tinyMCEPopup.editor, dom = tinyMCEPopup.dom, style; bgneal@45: bgneal@45: // Setup doctype select box bgneal@45: doctypes = ed.getParam("fullpage_doctypes", defaultDocTypes).split(','); bgneal@45: for (i=0; i 1) bgneal@45: addSelectValue(f, 'doctypes', p[0], p[1]); bgneal@45: } bgneal@45: bgneal@45: // Setup fonts select box bgneal@45: fonts = ed.getParam("fullpage_fonts", defaultFontNames).split(';'); bgneal@45: for (i=0; i 1) bgneal@45: addSelectValue(f, 'fontface', p[0], p[1]); bgneal@45: } bgneal@45: bgneal@45: // Setup fontsize select box bgneal@45: fonts = ed.getParam("fullpage_fontsizes", defaultFontSizes).split(','); bgneal@45: for (i=0; i 1) { bgneal@45: addSelectValue(f, 'element_style_media', p[0], p[1]); bgneal@45: addSelectValue(f, 'element_link_media', p[0], p[1]); bgneal@45: } bgneal@45: } bgneal@45: bgneal@45: // Setup encodings select box bgneal@45: encodings = ed.getParam("fullpage_encodings", defaultEncodings).split(','); bgneal@45: for (i=0; i 1) { bgneal@45: addSelectValue(f, 'docencoding', p[0], p[1]); bgneal@45: addSelectValue(f, 'element_script_charset', p[0], p[1]); bgneal@45: addSelectValue(f, 'element_link_charset', p[0], p[1]); bgneal@45: } bgneal@45: } bgneal@45: bgneal@45: document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); bgneal@45: document.getElementById('link_color_pickcontainer').innerHTML = getColorPickerHTML('link_color_pick','link_color'); bgneal@45: //document.getElementById('hover_color_pickcontainer').innerHTML = getColorPickerHTML('hover_color_pick','hover_color'); bgneal@45: document.getElementById('visited_color_pickcontainer').innerHTML = getColorPickerHTML('visited_color_pick','visited_color'); bgneal@45: document.getElementById('active_color_pickcontainer').innerHTML = getColorPickerHTML('active_color_pick','active_color'); bgneal@45: document.getElementById('textcolor_pickcontainer').innerHTML = getColorPickerHTML('textcolor_pick','textcolor'); bgneal@45: document.getElementById('stylesheet_browsercontainer').innerHTML = getBrowserHTML('stylesheetbrowser','stylesheet','file','fullpage'); bgneal@45: document.getElementById('link_href_pickcontainer').innerHTML = getBrowserHTML('link_href_browser','element_link_href','file','fullpage'); bgneal@45: document.getElementById('script_src_pickcontainer').innerHTML = getBrowserHTML('script_src_browser','element_script_src','file','fullpage'); bgneal@45: document.getElementById('bgimage_pickcontainer').innerHTML = getBrowserHTML('bgimage_browser','bgimage','image','fullpage'); bgneal@45: bgneal@45: // Resize some elements bgneal@45: if (isVisible('stylesheetbrowser')) bgneal@45: document.getElementById('stylesheet').style.width = '220px'; bgneal@45: bgneal@45: if (isVisible('link_href_browser')) bgneal@45: document.getElementById('element_link_href').style.width = '230px'; bgneal@45: bgneal@45: if (isVisible('bgimage_browser')) bgneal@45: document.getElementById('bgimage').style.width = '210px'; bgneal@45: bgneal@45: // Add iframe bgneal@45: dom.add(document.body, 'iframe', {id : 'documentIframe', src : 'javascript:""', style : {display : 'none'}}); bgneal@45: doc = dom.get('documentIframe').contentWindow.document; bgneal@45: h = tinyMCEPopup.getWindowArg('head_html'); bgneal@45: bgneal@45: // Preprocess the HTML disable scripts and urls bgneal@45: h = h.replace(/