1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3
* FCKeditor - The text editor for internet
4
* Copyright (C) 2003-2005 Frederico Caldeira Knabben
6
* Licensed under the terms of the GNU Lesser General Public License:
7
* http://www.opensource.org/licenses/lgpl-license.php
9
* For further information visit:
10
* http://www.fckeditor.net/
12
* "Support Open Source software. What about a donation today?"
14
* File Name: fck_docprops.html
18
* Frederico Caldeira Knabben (fredck@fckeditor.net)
22
<title>Document Properties</title>
23
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
24
<meta content="noindex, nofollow" name="robots">
25
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
26
<script language="javascript">
28
var oEditor = window.parent.InnerDialogLoaded() ;
29
var FCK = oEditor.FCK ;
30
var FCKLang = oEditor.FCKLang ;
31
var FCKConfig = oEditor.FCKConfig ;
35
// Set the dialog tabs.
36
window.parent.AddTab( 'General' , FCKLang.DlgDocGeneralTab ) ;
37
window.parent.AddTab( 'Background' , FCKLang.DlgDocBackTab ) ;
38
window.parent.AddTab( 'Colors' , FCKLang.DlgDocColorsTab ) ;
39
window.parent.AddTab( 'Meta' , FCKLang.DlgDocMetaTab ) ;
41
// Function called when a dialog tag is selected.
42
function OnDialogTabChange( tabCode )
44
ShowE( 'divGeneral' , ( tabCode == 'General' ) ) ;
45
ShowE( 'divBackground' , ( tabCode == 'Background' ) ) ;
46
ShowE( 'divColors' , ( tabCode == 'Colors' ) ) ;
47
ShowE( 'divMeta' , ( tabCode == 'Meta' ) ) ;
49
ShowE( 'ePreview' , ( tabCode == 'Background' || tabCode == 'Colors' ) ) ;
52
//#### Get Base elements from the document: BEGIN
54
// The HTML element of the document.
55
var oHTML = FCK.EditorDocument.getElementsByTagName('html')[0] ;
57
// The HEAD element of the document.
58
var oHead = oHTML.getElementsByTagName('head')[0] ;
60
var oBody = FCK.EditorDocument.body ;
62
// This object contains all META tags defined in the document.
63
var oMetaTags = new Object() ;
65
// Get all META tags defined in the document.
66
var aMetas = oHead.getElementsByTagName('meta') ;
68
// Loop throw all METAs and put it in the HashTable.
69
for ( var i = 0 ; i < aMetas.length ; i++ )
71
// Try to get the "name" attribute.
72
var sName = GetAttribute( aMetas[i], 'name', GetAttribute( aMetas[i], '___fcktoreplace:name', '' ) ) ;
74
// If no "name", try with the "http-equiv" attribute.
75
if ( sName.length == 0 )
79
// Get the http-equiv value from the outerHTML.
80
var oHttpEquivMatch = aMetas[i].outerHTML.match( oEditor.FCKRegexLib.MetaHttpEquiv ) ;
81
if ( oHttpEquivMatch )
82
sName = oHttpEquivMatch[1] ;
85
sName = GetAttribute( aMetas[i], 'http-equiv', '' ) ;
88
if ( sName.length > 0 )
89
oMetaTags[ sName.toLowerCase() ] = aMetas[i] ;
94
// Set a META tag in the document.
95
function SetMetadata( name, content, isHttp )
97
if ( content.length == 0 )
99
RemoveMetadata( name ) ;
103
var oMeta = oMetaTags[ name.toLowerCase() ] ;
107
oMeta = oHead.appendChild( FCK.EditorDocument.createElement('META') ) ;
110
SetAttribute( oMeta, 'http-equiv', name ) ;
113
// On IE, it is not possible to set the "name" attribute of the META tag.
114
// So a temporary attribute is used and it is replaced when getting the
115
// editor's HTML/XHTML value. This is sad, I know :(
117
SetAttribute( oMeta, '___fcktoreplace:name', name ) ;
119
SetAttribute( oMeta, 'name', name ) ;
122
oMetaTags[ name.toLowerCase() ] = oMeta ;
125
oMeta.content = content ;
128
function RemoveMetadata( name )
130
var oMeta = oMetaTags[ name.toLowerCase() ] ;
132
if ( oMeta && oMeta != null )
134
oMeta.parentNode.removeChild( oMeta ) ;
135
oMetaTags[ name.toLowerCase() ] = null ;
139
function GetMetadata( name )
141
var oMeta = oMetaTags[ name.toLowerCase() ] ;
143
if ( oMeta && oMeta != null )
144
return oMeta.content ;
149
window.onload = function ()
151
// Show/Hide the "Browse Server" button.
152
GetE('tdBrowse').style.display = oEditor.FCKConfig.ImageBrowser ? "" : "none";
154
// First of all, translate the dialog box texts
155
oEditor.FCKLanguageManager.TranslatePage( document ) ;
161
// Show the "Ok" button.
162
window.parent.SetOkButton( true ) ;
164
window.parent.SetAutoSize( true ) ;
167
function FillFields()
170
GetE('txtPageTitle').value = FCK.EditorDocument.title ;
172
GetE('selDirection').value = GetAttribute( oHTML, 'dir', '' ) ;
173
GetE('txtLang').value = GetAttribute( oHTML, 'xml:lang', GetAttribute( oHTML, 'lang', '' ) ) ; // "xml:lang" takes precedence to "lang".
175
// Character Set Encoding.
176
// if ( document.all )
177
// var sCharSet = FCK.EditorDocument.charset ;
179
var sCharSet = GetMetadata( 'Content-Type' ) ;
181
if ( sCharSet != null && sCharSet.length > 0 )
183
// if ( !document.all )
184
sCharSet = sCharSet.match( /[^=]*$/ ) ;
186
GetE('selCharSet').value = sCharSet ;
188
if ( GetE('selCharSet').selectedIndex == -1 )
190
GetE('selCharSet').value = '...' ;
191
GetE('txtCustomCharSet').value = sCharSet ;
193
CheckOther( GetE('selCharSet'), 'txtCustomCharSet' ) ;
198
if ( FCK.DocTypeDeclaration && FCK.DocTypeDeclaration.length > 0 )
200
GetE('selDocType').value = FCK.DocTypeDeclaration ;
202
if ( GetE('selDocType').selectedIndex == -1 )
204
GetE('selDocType').value = '...' ;
205
GetE('txtDocType').value = FCK.DocTypeDeclaration ;
207
CheckOther( GetE('selDocType'), 'txtDocType' ) ;
212
GetE('chkIncXHTMLDecl').checked = ( FCK.XmlDeclaration && FCK.XmlDeclaration.length > 0 ) ;
215
GetE('txtBackColor').value = GetAttribute( oBody, 'bgColor' , '' ) ;
216
GetE('txtBackImage').value = GetAttribute( oBody, 'background' , '' ) ;
217
GetE('chkBackNoScroll').checked = ( GetAttribute( oBody, 'bgProperties', '' ).toLowerCase() == 'fixed' ) ;
220
GetE('txtColorText').value = GetAttribute( oBody, 'text' , '' ) ;
221
GetE('txtColorLink').value = GetAttribute( oBody, 'link' , '' ) ;
222
GetE('txtColorVisited').value = GetAttribute( oBody, 'vLink' , '' ) ;
223
GetE('txtColorActive').value = GetAttribute( oBody, 'aLink' , '' ) ;
226
GetE('txtMarginTop').value = GetAttribute( oBody, 'topMargin' , '' ) ;
227
GetE('txtMarginLeft').value = GetAttribute( oBody, 'leftMargin' , '' ) ;
228
GetE('txtMarginRight').value = GetAttribute( oBody, 'rightMargin' , '' ) ;
229
GetE('txtMarginBottom').value = GetAttribute( oBody, 'bottomMargin' , '' ) ;
232
GetE('txtMetaKeywords').value = GetMetadata( 'keywords' ) ;
233
GetE('txtMetaDescription').value = GetMetadata( 'description' ) ;
234
GetE('txtMetaAuthor').value = GetMetadata( 'author' ) ;
235
GetE('txtMetaCopyright').value = GetMetadata( 'copyright' ) ;
238
// Called when the "Ok" button is clicked.
242
FCK.EditorDocument.title = GetE('txtPageTitle').value ;
244
var oHTML = FCK.EditorDocument.getElementsByTagName('html')[0] ;
246
SetAttribute( oHTML, 'dir' , GetE('selDirection').value ) ;
247
SetAttribute( oHTML, 'lang' , GetE('txtLang').value ) ;
248
SetAttribute( oHTML, 'xml:lang' , GetE('txtLang').value ) ;
250
// Character Set Enconding.
251
var sCharSet = GetE('selCharSet').value ;
252
if ( sCharSet == '...' )
253
sCharSet = GetE('txtCustomCharSet').value ;
255
if ( sCharSet.length > 0 )
256
sCharSet = 'text/html; charset=' + sCharSet ;
258
// if ( document.all )
259
// FCK.EditorDocument.charset = sCharSet ;
261
SetMetadata( 'Content-Type', sCharSet, true ) ;
264
var sDocType = GetE('selDocType').value ;
265
if ( sDocType == '...' )
266
sDocType = GetE('txtDocType').value ;
268
FCK.DocTypeDeclaration = sDocType ;
270
// XHTML Declarations.
271
if ( GetE('chkIncXHTMLDecl').checked )
273
if ( sCharSet.length == 0 )
276
FCK.XmlDeclaration = '<?xml version="1.0" encoding="' + sCharSet + '"?>' ;
278
SetAttribute( oHTML, 'xmlns', 'http://www.w3.org/1999/xhtml' ) ;
282
FCK.XmlDeclaration = null ;
283
oHTML.removeAttribute( 'xmlns', 0 ) ;
287
SetAttribute( oBody, 'bgcolor' , GetE('txtBackColor').value ) ;
288
SetAttribute( oBody, 'background' , GetE('txtBackImage').value ) ;
289
SetAttribute( oBody, 'bgproperties' , GetE('chkBackNoScroll').checked ? 'fixed' : '' ) ;
292
SetAttribute( oBody, 'text' , GetE('txtColorText').value ) ;
293
SetAttribute( oBody, 'link' , GetE('txtColorLink').value ) ;
294
SetAttribute( oBody, 'vlink', GetE('txtColorVisited').value ) ;
295
SetAttribute( oBody, 'alink', GetE('txtColorActive').value ) ;
298
SetAttribute( oBody, 'topmargin' , GetE('txtMarginTop').value ) ;
299
SetAttribute( oBody, 'leftmargin' , GetE('txtMarginLeft').value ) ;
300
SetAttribute( oBody, 'rightmargin' , GetE('txtMarginRight').value ) ;
301
SetAttribute( oBody, 'bottommargin' , GetE('txtMarginBottom').value ) ;
304
SetMetadata( 'keywords' , GetE('txtMetaKeywords').value ) ;
305
SetMetadata( 'description' , GetE('txtMetaDescription').value ) ;
306
SetMetadata( 'author' , GetE('txtMetaAuthor').value ) ;
307
SetMetadata( 'copyright' , GetE('txtMetaCopyright').value ) ;
312
var bPreviewIsLoaded = false ;
316
// Called by the Preview page when loaded.
317
function OnPreviewLoad( previewWindow, previewBody )
319
oPreviewWindow = previewWindow ;
320
oPreviewBody = previewBody ;
322
bPreviewIsLoaded = true ;
326
function UpdatePreview()
328
if ( !bPreviewIsLoaded )
332
SetAttribute( oPreviewBody, 'bgcolor' , GetE('txtBackColor').value ) ;
333
SetAttribute( oPreviewBody, 'background' , GetE('txtBackImage').value ) ;
334
SetAttribute( oPreviewBody, 'bgproperties' , GetE('chkBackNoScroll').checked ? 'fixed' : '' ) ;
337
SetAttribute( oPreviewBody, 'text', GetE('txtColorText').value ) ;
339
oPreviewWindow.SetLinkColor( GetE('txtColorLink').value ) ;
340
oPreviewWindow.SetVisitedColor( GetE('txtColorVisited').value ) ;
341
oPreviewWindow.SetActiveColor( GetE('txtColorActive').value ) ;
344
function CheckOther( combo, txtField )
346
var bNotOther = ( combo.value != '...' ) ;
348
GetE(txtField).style.backgroundColor = ( bNotOther ? '#cccccc' : '' ) ;
349
GetE(txtField).disabled = bNotOther ;
352
function SetColor( inputId, color )
354
GetE( inputId ).value = color + '' ;
358
function SelectBackColor( color ) { SetColor('txtBackColor', color ) ; }
359
function SelectColorText( color ) { SetColor('txtColorText', color ) ; }
360
function SelectColorLink( color ) { SetColor('txtColorLink', color ) ; }
361
function SelectColorVisited( color ) { SetColor('txtColorVisited', color ) ; }
362
function SelectColorActive( color ) { SetColor('txtColorActive', color ) ; }
364
function SelectColor( wich )
368
case 'Back' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, SelectBackColor, window ) ; return ;
369
case 'ColorText' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, SelectColorText, window ) ; return ;
370
case 'ColorLink' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, SelectColorLink, window ) ; return ;
371
case 'ColorVisited' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, SelectColorVisited, window ) ; return ;
372
case 'ColorActive' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, SelectColorActive, window ) ; return ;
376
function BrowseServerBack()
378
OpenFileBrowser( FCKConfig.ImageBrowserURL, FCKConfig.ImageBrowserWindowWidth, FCKConfig.ImageBrowserWindowHeight ) ;
381
function SetUrl( url )
383
GetE('txtBackImage').value = url ;
389
<body scroll="no" style="OVERFLOW: hidden">
390
<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
392
<td vAlign="top" height="100%">
393
<div id="divGeneral">
394
<span fckLang="DlgDocPageTitle">Page Title</span><br>
395
<input id="txtPageTitle" style="WIDTH: 100%" type="text">
397
<table cellSpacing="0" cellPadding="0" border="0">
400
<span fckLang="DlgDocLangDir">Language Direction</span><br>
401
<select id="selDirection">
402
<option value="" selected></option>
403
<option value="ltr" fckLang="DlgDocLangDirLTR">Left to Right (LTR)</option>
404
<option value="rtl" fckLang="DlgDocLangDirRTL">Right to Left (RTL)</option>
407
<td> </td>
409
<span fckLang="DlgDocLangCode">Language Code</span><br>
410
<input id="txtLang" type="text">
415
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
417
<td noWrap><span fckLang="DlgDocCharSet">Character Set Encoding</span><br>
418
<select id="selCharSet" onchange="CheckOther( this, 'txtCustomCharSet' );">
419
<option value="" selected></option>
420
<option value="us-ascii">ASCII</option>
421
<option value="iso-8859-2">Central European</option>
422
<option value="big5">Chinese Traditional (Big5)</option>
423
<option value="iso-8859-5">Cyrillic</option>
424
<option value="iso-8859-7">Greek</option>
425
<option value="iso-2022-jp">Japanese</option>
426
<option value="iso-2022-kr">Korean</option>
427
<option value="iso-8859-9">Turkish</option>
428
<option value="utf-8">Unicode (UTF-8)</option>
429
<option value="iso-8859-1">Western European</option>
430
<option value="..." fckLang="DlgOpOther"><Other></option>
433
<td> </td>
435
<span fckLang="DlgDocCharSetOther">Other Character Set Encoding</span><br>
436
<input id="txtCustomCharSet" style="WIDTH: 100%; BACKGROUND-COLOR: #cccccc" disabled type="text">
440
<td colspan="3"> </td>
444
<span fckLang="DlgDocDocType">Document Type Heading</span><br>
445
<select id="selDocType" name="selDocType" onchange="CheckOther( this, 'txtDocType' );">
446
<option value="" selected></option>
447
<option value='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">'>HTML
448
4.01 Transitional</option>
449
<option value='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">'>HTML
451
<option value='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">'>HTML
452
4.01 Frameset</option>
453
<option value='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'>XHTML
454
1.0 Transitional</option>
455
<option value='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'>XHTML
457
<option value='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">'>XHTML
458
1.0 Frameset</option>
459
<option value='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'>XHTML
461
<option value='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">'>HTML 3.2</option>
462
<option value='<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">'>HTML 2.0</option>
463
<option value="..." fckLang="DlgOpOther"><Other></option>
468
<span fckLang="DlgDocDocTypeOther">Other Document Type Heading</span><br>
469
<input id="txtDocType" style="WIDTH: 100%; BACKGROUND-COLOR: #cccccc" disabled type="text">
474
<input id="chkIncXHTMLDecl" type="checkbox"> <label for="chkIncXHTMLDecl" fckLang="DlgDocIncXHTML">Include
475
XHTML Declarations</label>
477
<div id="divBackground" style="DISPLAY: none">
478
<span fckLang="DlgDocBgColor">Background Color</span><br>
479
<input id="txtBackColor" type="text" onchange="UpdatePreview();" onkeyup="UpdatePreview();"> <input id="btnSelBackColor" onclick="SelectColor( 'Back' )" type="button" value="Select..."
480
fckLang="DlgCellBtnSelect"><br>
482
<span fckLang="DlgDocBgImage">Background Image URL</span><br>
483
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
485
<td width="100%"><input id="txtBackImage" style="WIDTH: 100%" type="text" onchange="UpdatePreview();" onkeyup="UpdatePreview();"></td>
486
<td id="tdBrowse" nowrap> <input id="btnBrowse" onclick="BrowseServerBack();" type="button" fckLang="DlgBtnBrowseServer" value="Browse Server" fckLang="DlgBtnBrowseServer"></td>
489
<input id="chkBackNoScroll" type="checkbox" onclick="UpdatePreview();"> <label for="chkBackNoScroll" fckLang="DlgDocBgNoScroll">Nonscrolling
492
<div id="divColors" style="DISPLAY: none">
493
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
496
<span fckLang="DlgDocCText">Text</span><br>
497
<input id="txtColorText" type="text" onchange="UpdatePreview();" onkeyup="UpdatePreview();"><input onclick="SelectColor( 'ColorText' )" type="button" value="Select..." fckLang="DlgCellBtnSelect">
499
<span fckLang="DlgDocCLink">Link</span><br>
500
<input id="txtColorLink" type="text" onchange="UpdatePreview();" onkeyup="UpdatePreview();"><input onclick="SelectColor( 'ColorLink' )" type="button" value="Select..." fckLang="DlgCellBtnSelect">
502
<span fckLang="DlgDocCVisited">Visited Link</span><br>
503
<input id="txtColorVisited" type="text" onchange="UpdatePreview();" onkeyup="UpdatePreview();"><input onclick="SelectColor( 'ColorVisited' )" type="button" value="Select..." fckLang="DlgCellBtnSelect">
505
<span fckLang="DlgDocCActive">Active Link</span><br>
506
<input id="txtColorActive" type="text" onchange="UpdatePreview();" onkeyup="UpdatePreview();"><input onclick="SelectColor( 'ColorActive' )" type="button" value="Select..." fckLang="DlgCellBtnSelect">
508
<td valign="middle" align="center">
509
<table cellspacing="2" cellpadding="0" border="0">
511
<td><span fckLang="DlgDocMargins">Page Margins</span></td>
514
<td style="BORDER: #000000 1px solid; PADDING: 5px">
515
<table cellpadding="0" cellspacing="0" border="0" dir="ltr">
517
<td align="center" colspan="3">
518
<span fckLang="DlgDocMaTop">Top</span><br>
519
<input id="txtMarginTop" type="text" size="3">
524
<span fckLang="DlgDocMaLeft">Left</span><br>
525
<input id="txtMarginLeft" type="text" size="3">
527
<td> </td>
529
<span fckLang="DlgDocMaRight">Right</span><BR>
530
<input id="txtMarginRight" type="text" size="3">
534
<td align="center" colspan="3">
535
<span fckLang="DlgDocMaBottom">Bottom</span><br>
536
<input id="txtMarginBottom" type="text" size="3">
547
<div id="divMeta" style="DISPLAY: none">
548
<span fckLang="DlgDocMeIndex">Document Indexing Keywords (comma separated)</span><br>
549
<textarea id="txtMetaKeywords" style="WIDTH: 100%" rows="2" cols="20"></textarea>
551
<span fckLang="DlgDocMeDescr">Document Description</span><br>
552
<textarea id="txtMetaDescription" style="WIDTH: 100%" rows="4" cols="20"></textarea>
554
<span fckLang="DlgDocMeAuthor">Author</span><br>
555
<input id="txtMetaAuthor" style="WIDTH: 100%" type="text"><br>
557
<span fckLang="DlgDocMeCopy">Copyright</span><br>
558
<input id="txtMetaCopyright" type="text" style="WIDTH: 100%">
562
<tr id="ePreview" style="DISPLAY: none">
564
<span fckLang="DlgDocPreview">Preview</span><br>
565
<iframe id="frmPreview" src="fck_docprops/fck_document_preview.html" width="100%" height="100"></iframe>
b'\\ No newline at end of file'