synced Connys FCKEditor import from 1.4

This commit is contained in:
Ralf Becker 2007-04-14 12:21:09 +00:00
parent d5c279c353
commit 9495ece599
377 changed files with 17871 additions and 12349 deletions

View File

@ -1,15 +1,23 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

View File

@ -1,20 +1,24 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: fckplugin.js
* This is the sample plugin definition file.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* This is the sample plugin definition file.
*/
// Register the related commands.

View File

@ -1,21 +1,25 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: find.html
* This is the sample "Find" plugin window.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* This is the sample "Find" plugin window.
-->
<html>
<head>
@ -30,7 +34,7 @@ function OnLoad()
// Whole word is available on IE only.
if ( oEditor.FCKBrowserInfo.IsIE )
document.getElementById('divWord').style.display = '' ;
// First of all, translate the dialog box texts.
oEditor.FCKLanguageManager.TranslatePage( document ) ;
@ -39,7 +43,7 @@ function OnLoad()
function btnStat(frm)
{
document.getElementById('btnFind').disabled =
document.getElementById('btnFind').disabled =
( document.getElementById('txtFind').value.length == 0 ) ;
}
@ -73,11 +77,11 @@ function GetRegexExpr()
var sExpr = '\\b' + document.getElementById('txtFind').value + '\\b' ;
else
var sExpr = document.getElementById('txtFind').value ;
return sExpr ;
}
function GetCase()
function GetCase()
{
return ( document.getElementById('chkCase').checked ? '' : 'i' ) ;
}
@ -86,7 +90,7 @@ function Ok()
{
if ( document.getElementById('txtFind').value.length == 0 )
return ;
if ( oEditor.FCKBrowserInfo.IsIE )
FindIE() ;
else
@ -101,15 +105,15 @@ function FindIE()
oRange = oEditor.FCK.EditorDocument.body.createTextRange() ;
var iFlags = 0 ;
if ( chkCase.checked )
iFlags = iFlags | 4 ;
if ( chkWord.checked )
iFlags = iFlags | 2 ;
var bFound = oRange.findText( document.getElementById('txtFind').value, 1, iFlags ) ;
if ( bFound )
{
oRange.scrollIntoView() ;
@ -128,10 +132,10 @@ function FindGecko()
{
var bCase = document.getElementById('chkCase').checked ;
var bWord = document.getElementById('chkWord').checked ;
// window.find( searchString, caseSensitive, backwards, wrapAround, wholeWord, searchInFrames, showDialog ) ;
oEditor.FCK.EditorWindow.find( document.getElementById('txtFind').value, bCase, false, false, bWord, false, false ) ;
}
</script>
</head>
@ -154,11 +158,11 @@ function FindGecko()
</tr>
<tr>
<td valign="bottom" colSpan="3">
&nbsp;<input id="chkCase" tabIndex="3" type="checkbox"><label for="chkCase" fckLang="DlgMyReplaceCaseChk">Match
&nbsp;<input id="chkCase" tabIndex="3" type="checkbox"><label for="chkCase" fckLang="DlgMyReplaceCaseChk">Match
case</label>
<br>
<div id="divWord" style="DISPLAY: none">
&nbsp;<input id="chkWord" tabIndex="4" type="checkbox"><label for="chkWord" fckLang="DlgMyReplaceWordChk">Match
&nbsp;<input id="chkWord" tabIndex="4" type="checkbox"><label for="chkWord" fckLang="DlgMyReplaceWordChk">Match
whole word</label>
</div>
</td>

View File

@ -1,20 +1,24 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: en.js
* English language file for the sample plugin.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* English language file for the sample plugin.
*/
FCKLang['DlgMyReplaceTitle'] = 'Plugin - Replace' ;

View File

@ -1,20 +1,24 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: fr.js
* French language file for the sample plugin.
*
* File Authors:
* Benjamin Cartereau (b.cartereau@infass.com)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* French language file for the sample plugin.
*/
FCKLang['DlgMyReplaceTitle'] = 'Plugin - Remplacer' ;

View File

@ -1,20 +1,24 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: it.js
* Italian language file for the sample plugin.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Italian language file for the sample plugin.
*/
FCKLang['DlgMyReplaceTitle'] = 'Plugin - Sostituisci' ;

View File

@ -1,21 +1,25 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: replace.html
* This is the sample "Replace" plugin window.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* This is the sample "Replace" plugin window.
-->
<html>
<head>
@ -35,8 +39,8 @@ function OnLoad()
function btnStat(frm)
{
document.getElementById('btnReplace').disabled =
document.getElementById('btnReplaceAll').disabled =
document.getElementById('btnReplace').disabled =
document.getElementById('btnReplaceAll').disabled =
( document.getElementById('txtFind').value.length == 0 ) ;
}
@ -61,7 +65,7 @@ function ReplaceTextNodes( parentNode, regex, replaceValue, replaceAll, hasFound
if ( ! replaceAll && hasFound )
return true ;
}
return hasFound ;
}
@ -71,11 +75,11 @@ function GetRegexExpr()
var sExpr = '\\b' + document.getElementById('txtFind').value + '\\b' ;
else
var sExpr = document.getElementById('txtFind').value ;
return sExpr ;
}
function GetCase()
function GetCase()
{
return ( document.getElementById('chkCase').checked ? '' : 'i' ) ;
}
@ -109,7 +113,7 @@ function ReplaceAll()
</td>
</tr>
<tr>
<td vAlign="top" nowrap><label for="txtReplace" fckLang="DlgMyReplaceReplaceLbl">Replace
<td vAlign="top" nowrap><label for="txtReplace" fckLang="DlgMyReplaceReplaceLbl">Replace
with:</label>
</td>
<td vAlign="top"><input id="txtReplace" style="WIDTH: 100%" tabIndex="2" type="text">
@ -119,10 +123,10 @@ function ReplaceAll()
</td>
</tr>
<tr>
<td vAlign="bottom" colSpan="3">&nbsp;<input id="chkCase" tabIndex="3" type="checkbox"><label for="chkCase" fckLang="DlgMyReplaceCaseChk">Match
<td vAlign="bottom" colSpan="3">&nbsp;<input id="chkCase" tabIndex="3" type="checkbox"><label for="chkCase" fckLang="DlgMyReplaceCaseChk">Match
case</label>
<br>
&nbsp;<input id="chkWord" tabIndex="4" type="checkbox"><label for="chkWord" fckLang="DlgMyReplaceWordChk">Match
&nbsp;<input id="chkWord" tabIndex="4" type="checkbox"><label for="chkWord" fckLang="DlgMyReplaceWordChk">Match
whole word</label>
</td>
</tr>

View File

@ -1,20 +1,24 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: fckplugin.js
* This is a sample plugin definition file.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* This is a sample plugin definition file.
*/
// Here we define our custom Style combo, with custom widths.
@ -36,7 +40,7 @@ oMyCMCommand.Execute = function()
// This command is called only when an image element is selected (IMG).
// Get image URL (src).
var sUrl = FCKSelection.GetSelectedElement().src ;
// Open the URL in a new window.
window.top.open( sUrl ) ;
}

View File

@ -1,4 +1,26 @@
DEFINE CLASS fckeditor AS custom
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* This is the class definition file for the sample pages.
*
DEFINE CLASS fckeditor AS custom
cInstanceName =""
BasePath =""
cWIDTH =""
@ -11,7 +33,7 @@ DEFINE CLASS fckeditor AS custom
FUNCTION fckeditor( tcInstanceName )
LOCAL lnLoop,lnLoop2
THIS.cInstanceName = tcInstanceName
THIS.BasePath = '../../'
THIS.BasePath = '../../../FCKeditor/'
THIS.cWIDTH = '100%'
THIS.cHEIGHT = '200'
THIS.ToolbarSet = 'Default'
@ -41,8 +63,8 @@ DEFINE CLASS fckeditor AS custom
IF THIS.IsCompatible()
lcLink = THIS.BasePath+[editor/fckeditor.html?InstanceName=]+THIS.cInstanceName
IF ( THIS.ToolbarSet # '' )
lcLink = lcLink + [Toolbar=]+THIS.ToolbarSet
IF ( !THIS.ToolbarSet == '' )
lcLink = lcLink + [&Toolbar=]+THIS.ToolbarSet
ENDIF
&& Render the LINKED HIDDEN FIELD.
@ -52,7 +74,7 @@ DEFINE CLASS fckeditor AS custom
html = html + [<input type="hidden" id="]+THIS.cInstanceName +[___Config" value="]+THIS.GetConfigFieldString() + [">] +CHR(13)+CHR(10)
&& Render the EDITOR IFRAME.
html = html + [<iframe id="]+THIS.cInstanceName +[___Frame" src="]+lcLink+[" width="]+THIS.cWIDTH+[" height="]+THIS.cHEIGHT+[" frameborder="0" scrolling="no"></iframe>]
html = html + [<iframe id="]+THIS.cInstanceName +[___Frame" src="]+lcLink+[" width="]+THIS.cWIDTH+[" height="]+THIS.cHEIGHT+[" frameborder="no" scrolling="no"></iframe>]
ELSE
IF ( AT("%", THIS.cWIDTH)=0 )
WidthCSS = THIS.cWIDTH + 'px'
@ -117,5 +139,28 @@ DEFINE CLASS fckeditor AS custom
NEXT
RETURN(sParams)
ENDFUNC
&& -----------------------------------------------------------------------
&& This function removes unwanted characters in URL parameters mostly entered by hackers
FUNCTION StripAttacks
LPARAMETERS tcString
IF !EMPTY(tcString)
tcString=STRTRAN(tcString,"&","")
tcString=STRTRAN(tcString,"?","")
tcString=STRTRAN(tcString,";","")
tcString=STRTRAN(tcString,"!","")
tcString=STRTRAN(tcString,"<%","")
tcString=STRTRAN(tcString,"%>","")
tcString=STRTRAN(tcString,"<","")
tcString=STRTRAN(tcString,">","")
tcString=STRTRAN(tcString,"..","")
tcString=STRTRAN(tcString,"/","")
tcString=STRTRAN(tcString,"\","")
tcString=STRTRAN(tcString,":","")
ELSE
tcString=""
ENDIF
RETURN (tcString)
ENDDEFINE

View File

@ -1,26 +1,30 @@
<%
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: sampleposteddata.php
* This page lists the data posted by a form.
*
* Version: 1.0
* Modified: 2005-07-01
*
* File Authors: Soenke Freitag (www.afp-hosting.de)
*
<%
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* This page lists the data posted by a form.
*
%>
<html>
<head>
<title>FCKeditor - Sample</title>
<title>FCKeditor - AFP Sample 1</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
<link href="../sample.css" rel="stylesheet" type="text/css" />
@ -32,17 +36,17 @@
<form action="sampleposteddata.afp" method="post" target="_blank">
<%
sBasePath="../../fckeditor/" && Change this to your local path
sBasePath="../../../fckeditor/" && Change this to your local path
lcText=[This is some <strong>sample text</strong>. You are using ]
lcText=lcText+[<a href='http://www.fckeditor.net/'>FCKeditor</a>.]
lcText=[This is some <strong>sample text</strong>. You are using ]
lcText=lcText+[<a href='http://www.fckeditor.net/'>FCKeditor</a>.]
oFCKeditor = CREATEOBJECT("FCKeditor")
oFCKeditor.fckeditor("FCKeditor1")
oFCKeditor.BasePath = sBasePath
oFCKeditor.cValue = lcText
oFCKeditor = CREATEOBJECT("FCKeditor")
oFCKeditor.fckeditor("FCKeditor1")
oFCKeditor.BasePath = sBasePath
oFCKeditor.cValue = lcText
? oFCKeditor.Create()
? oFCKeditor.Create()
%>
<br>

View File

@ -0,0 +1,113 @@
<%
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* This page is a basic Sample for FCKeditor integration in the AFP script language (www.afpages.de)
*
%>
<html>
<head>
<title>FCKeditor - AFP Sample 2</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
<link href="../sample.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function FCKeditor_OnComplete( editorInstance )
{
var oCombo = document.getElementById( 'cmbLanguages' ) ;
for ( code in editorInstance.Language.AvailableLanguages )
{
AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ;
}
oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
}
function AddComboOption(combo, optionText, optionValue)
{
var oOption = document.createElement("OPTION") ;
combo.options.add(oOption) ;
oOption.innerHTML = optionText ;
oOption.value = optionValue ;
return oOption ;
}
function ChangeLanguage( languageCode )
{
window.location.href = window.location.pathname + "?Lang=" + languageCode ;
}
</script>
</head>
<body>
<h1>FCKeditor - AFP - Sample 2</h1>
This sample shows the editor in all its available languages.
<hr>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
Select a language:&nbsp;
</td>
<td>
<select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
</select>
</td>
</tr>
</table>
<br>
<form action="sampleposteddata.afp" method="post" target="_blank">
<%
sBasePath="../../../fckeditor/" && Change this to your local path
oFCKeditor = CREATEOBJECT("FCKeditor")
oFCKeditor.fckeditor("FCKeditor1")
lcLanguage="" && Initialize Variable
lcLanguage=request.querystring("Lang") && Request Parameter
lcLanguage=oFCKeditor.StripAttacks(lcLanguage) && Remove special escape characters
IF EMPTY(lcLanguage)
oFCKeditor.aconfig[1,1]="AutoDetectLanguage"
oFCKeditor.aconfig[1,2]="true"
oFCKeditor.aconfig[2,1]="DefaultLanguage"
oFCKeditor.aconfig[2,2]="en"
ELSE
oFCKeditor.aconfig[1,1]="AutoDetectLanguage"
oFCKeditor.aconfig[1,2]="false"
oFCKeditor.aconfig[2,1]="DefaultLanguage"
oFCKeditor.aconfig[2,2]=lcLanguage
ENDIF
lcText=[This is some <strong>sample text</strong>. You are using ]
lcText=lcText+[<a href='http://www.fckeditor.net/'>FCKeditor</a>.]
oFCKeditor.BasePath = sBasePath
oFCKeditor.cValue = lcText
? oFCKeditor.Create()
%>
<br>
<input type="submit" value="Submit">
</form>
</body>
</html>

View File

@ -0,0 +1,91 @@
<%
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* This page is a basic Sample for FCKeditor integration in the AFP script language (www.afpages.de)
*
%>
<html>
<head>
<title>FCKeditor - AFP Sample 3</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
<link href="../sample.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function FCKeditor_OnComplete( editorInstance )
{
var oCombo = document.getElementById( 'cmbToolbars' ) ;
oCombo.value = editorInstance.ToolbarSet.Name ;
oCombo.style.visibility = '' ;
}
function ChangeToolbar( toolbarName )
{
window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ;
}
</script>
</head>
<body>
<h1>FCKeditor - AFP - Sample 3</h1>
This sample shows how to change the editor toolbar.
<hr>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
Select the toolbar to load:&nbsp;
</td>
<td>
<select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden">
<option value="Default" selected>Default</option>
<option value="Basic">Basic</option>
</select>
</td>
</tr>
</table>
<br>
<form action="sampleposteddata.afp" method="post" target="_blank">
<%
sBasePath="../../../fckeditor/" && Change this to your local path
oFCKeditor = CREATEOBJECT("FCKeditor")
oFCKeditor.fckeditor("FCKeditor1")
lcToolbar=request.querystring("Toolbar") && Request Parameter
lcToolbar=oFCKeditor.StripAttacks(lcToolbar) && Remove special escape characters
IF !EMPTY(lcToolbar)
oFCKeditor.ToolbarSet=lcToolbar
ENDIF
lcText=[This is some <strong>sample text</strong>. You are using ]
lcText=lcText+[<a href='http://www.fckeditor.net/'>FCKeditor</a>.]
oFCKeditor.BasePath = sBasePath
oFCKeditor.cValue = lcText
? oFCKeditor.Create()
%>
<br>
<input type="submit" value="Submit">
</form>
</body>
</html>

View File

@ -0,0 +1,98 @@
<%
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* This page is a basic Sample for FCKeditor integration in the AFP script language (www.afpages.de)
*
%>
<html>
<head>
<title>FCKeditor - AFP Sample 4</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
<link href="../sample.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function FCKeditor_OnComplete( editorInstance )
{
var oCombo = document.getElementById( 'cmbSkins' ) ;
// Get the active skin.
var sSkin = editorInstance.Config['SkinPath'] ;
sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
oCombo.value = sSkin ;
oCombo.style.visibility = '' ;
}
function ChangeSkin( skinName )
{
window.location.href = window.location.pathname + "?Skin=" + skinName ;
}
</script>
</head>
<body>
<h1>FCKeditor - AFP - Sample 4</h1>
This sample shows how to change the editor skin.
<hr>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
Select the skin to load:&nbsp;
</td>
<td>
<select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden">
<option value="default" selected>Default</option>
<option value="office2003">Office 2003</option>
<option value="silver">Silver</option>
</select>
</td>
</tr>
</table>
<br>
<form action="sampleposteddata.afp" method="post" target="_blank">
<%
sBasePath="../../../fckeditor/" && <-- Change this to your local path
oFCKeditor = CREATEOBJECT("FCKeditor")
oFCKeditor.fckeditor("FCKeditor1")
lcSkin=request.querystring("Skin") && Request Parameter
lcSkin=oFCKeditor.StripAttacks(lcSkin) && Remove special escape characters
IF !EMPTY(lcSkin)
oFCKeditor.aconfig[1,1]="SkinPath"
oFCKeditor.aconfig[1,2]="/fckeditor/editor/skins/"+lcSkin+"/" && <-- Change this to your local path
ENDIF
lcText=[This is some <strong>sample text</strong>. You are using ]
lcText=lcText+[<a href='http://www.fckeditor.net/'>FCKeditor</a>.]
oFCKeditor.BasePath = sBasePath
oFCKeditor.cValue = lcText
? oFCKeditor.Create()
%>
<br>
<input type="submit" value="Submit">
</form>
</body>
</html>

View File

@ -1,26 +1,30 @@
<%
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: sampleposteddata.php
* This page lists the data posted by a form.
*
* Version: 1.0
* Modified: 2005-07-01
*
* File Authors: Soenke Freitag (www.afp-hosting.de)
*
<%
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* This page lists the data posted by a form.
*
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>FCKeditor - Samples - Posted Data</title>
<title>FCKeditor - AFP - Samples - Posted Data</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
<link href="../sample.css" rel="stylesheet" type="text/css" />
@ -41,10 +45,12 @@
FOR lnLoop=1 TO MEMLINES(lcForm)
lcZeile=ALLTRIM(MLINE(lcForm,lnLoop))
IF AT("=",lcZeile)>0
lcVariable=UPPER(ALLTRIM(LEFT(lcZeile,AT("=",lcZeile)-1)))
lcVariable=UPPER(ALLTRIM(LEFT(lcZeile,AT("=",lcZeile)-1)))
lcWert=ALLTRIM(RIGHT(lcZeile,LEN(lcZeile)-AT("=",lcZeile)))
lcWert=Server.UrlDecode( lcWert )
lcWert=Server.UrlDecode( lcWert )
lcWert=STRTRAN(lcWert,"<","&lt;")
lcWert=STRTRAN(lcWert,">","&gt;") && ... if wanted remove/translate HTML Chars ...
? [<tr><td>]+lcVariable+[ =</td><td>]+lcWert+[</td></tr>]
ENDIF
NEXT

View File

@ -1,22 +1,26 @@
<%@ codepage="65001" language="VBScript" %>
<% Option Explicit %>
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample01.asp
* Sample page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
-->
<% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %>
<!-- #INCLUDE file="../../fckeditor.asp" -->

View File

@ -1,22 +1,26 @@
<%@ CodePage=65001 Language="VBScript"%>
<% Option Explicit %>
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample02.asp
* Sample page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
-->
<% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %>
<!-- #INCLUDE file="../../fckeditor.asp" -->
@ -37,7 +41,7 @@ function FCKeditor_OnComplete( editorInstance )
AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ;
}
oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
}
}
function AddComboOption(combo, optionText, optionValue)
{
@ -47,7 +51,7 @@ function AddComboOption(combo, optionText, optionValue)
oOption.innerHTML = optionText ;
oOption.value = optionValue ;
return oOption ;
}

View File

@ -1,22 +1,26 @@
<%@ CodePage=65001 Language="VBScript"%>
<% Option Explicit %>
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample03.asp
* Sample page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
-->
<% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %>
<!-- #INCLUDE file="../../fckeditor.asp" -->

View File

@ -1,22 +1,26 @@
<%@ CodePage=65001 Language="VBScript"%>
<% Option Explicit %>
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample04.asp
* Sample page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
-->
<% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %>
<!-- #INCLUDE file="../../fckeditor.asp" -->
@ -32,11 +36,11 @@
function FCKeditor_OnComplete( editorInstance )
{
var oCombo = document.getElementById( 'cmbSkins' ) ;
// Get the active skin.
var sSkin = editorInstance.Config['SkinPath'] ;
sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
oCombo.value = sSkin ;
oCombo.style.visibility = '' ;
}

View File

@ -1,22 +1,26 @@
<%@ CodePage=65001 Language="VBScript"%>
<% Option Explicit %>
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sampleposteddata.asp
* This page lists the data posted by a form.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* This page lists the data posted by a form.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
@ -35,9 +39,9 @@
<td noWrap>Field Name&nbsp;&nbsp;</td>
<td>Value</td>
</tr>
<%
<%
Dim sForm
For Each sForm in Request.Form
For Each sForm in Request.Form
%>
<tr>
<td valign="top" nowrap><b><%=sForm%></b></td>

View File

@ -1,23 +1,25 @@
<cfsetting enablecfoutputonly="true" showdebugoutput="false">
<cfsetting enablecfoutputonly="true" showdebugoutput="false">
<!---
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample01.cfm
* Sample page for ColdFusion.
*
* File Authors:
* Hendrik Kramer (hk@lwd.de)
* Mark Woods (mark@thickpaddy.com)
* Wim Lemmens (didgiman@gmail.com)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page for ColdFusion.
--->
<cfoutput>
@ -33,13 +35,13 @@
<body>
<h1>FCKeditor - ColdFusion - Sample 1</h1>
This sample displays a normal HTML form with a FCKeditor with full features enabled; invoked by a ColdFusion Custom Tag / Module.
<hr>
<form method="POST" action="#cgi.script_name#">
</cfoutput>
<cfmodule
<cfmodule
template="../../fckeditor.cfm"
basePath="#Left(cgi.script_name, FindNoCase('_samples', cgi.script_name)-1)#"
instanceName="myEditor"
@ -56,6 +58,7 @@ This sample displays a normal HTML form with a FCKeditor with full features enab
<cfif isDefined( 'FORM.fieldnames' )>
<cfoutput>
<hr />
<style>
<!--
td, th { font: 11px Verdana, Arial, Helv, Helvetica, sans-serif; }

View File

@ -1,38 +1,41 @@
<cfsetting enablecfoutputonly="true">
<cfsetting enablecfoutputonly="true">
<!---
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample02_mx.cfm
* Sample page for ColdFusion MX.
*
* File Authors:
* Hendrik Kramer (hk@lwd.de)
* Wim Lemmens (didgiman@gmail.com)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page for ColdFusion MX.
--->
<!--- ::
* You must set the url path to the base directory for your media files (images, flash, files)
* The best position for this variable is in your Application.cfm file
*
*
* Possible variable scopes are:
* <cfset APPLICATION.userFilesPath = "/UserFiles/">
* <cfset APPLICATION.userFilesPath = "/userfiles/">
* OR:
* <cfset SERVER.userFilesPath = "/UserFiles/">
* <cfset SERVER.userFilesPath = "/userfiles/">
* OR:
* <cfset request.FCKeditor.userFilesPath = "/UserFiles/">
* <cfset request.FCKeditor.userFilesPath = "/userfiles/">
* OR:
* <cfset application.FCKeditor.userFilesPath = "/UserFiles/">
* <cfset application.FCKeditor.userFilesPath = "/userfiles/">
* OR:
* <cfset server.FCKeditor.userFilesPath = "/UserFiles/">
* <cfset server.FCKeditor.userFilesPath = "/userfiles/">
*
* Note #1: Do _not_ set the physical directory on your server, only a path relative to your current webroot
* Note #2: Directories will be automatically created
@ -80,8 +83,8 @@ This sample displays a normal HTML form with a FCKeditor with full features enab
<hr />
</cfoutput>
<cfdump
var="#FORM#"
<cfdump
var="#FORM#"
label="Dump of FORM Variables"
>

View File

@ -1,22 +1,26 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: default.html
* Samples Frameset page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Samples Frameset page.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
<title>FCKeditor - Samples</title>

View File

@ -1,21 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample01.html
* Sample page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

View File

@ -1,21 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample02.html
* Sample page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

View File

@ -1,21 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample03.html
* Sample page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@ -34,9 +38,9 @@ function FCKeditor_OnComplete( editorInstance )
return ;
var oCombo = document.getElementById( 'cmbLanguages' ) ;
var aLanguages = new Array() ;
for ( code in editorInstance.Language.AvailableLanguages )
aLanguages.push( { Code : code, Name : editorInstance.Language.AvailableLanguages[code] } ) ;
@ -44,11 +48,11 @@ function FCKeditor_OnComplete( editorInstance )
for ( var i = 0 ; i < aLanguages.length ; i++ )
AddComboOption( oCombo, aLanguages[i].Name + ' (' + aLanguages[i].Code + ')', aLanguages[i].Code ) ;
oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
document.getElementById('eNumLangs').innerHTML = '(' + aLanguages.length + ' languages available!)' ;
bIsLoaded = true ;
}
@ -65,7 +69,7 @@ function AddComboOption(combo, optionText, optionValue)
oOption.innerHTML = optionText ;
oOption.value = optionValue ;
return oOption ;
}

View File

@ -1,21 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample04.html
* Sample page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

View File

@ -1,21 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample05.html
* Sample page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@ -29,11 +33,11 @@
function FCKeditor_OnComplete( editorInstance )
{
var oCombo = document.getElementById( 'cmbSkins' ) ;
// Get the active skin.
var sSkin = editorInstance.Config['SkinPath'] ;
sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
oCombo.value = sSkin ;
oCombo.style.visibility = '' ;
}
@ -99,7 +103,7 @@ if ( sSkin != null )
sSkinPath + 'images/toolbar.bg.gif' + ';' +
sSkinPath + 'images/toolbar.buttonarrow.gif' ;
break ;
case 'silver' :
oFCKeditor.Config['PreloadImages'] =
sSkinPath + 'images/toolbar.start.gif' + ';' +

View File

@ -1,20 +1,24 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample06.config.js
* Sample custom configuration settings used in the plugin sample page (sample06).
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample custom configuration settings used in the plugin sample page (sample06).
*/
// Set our sample toolbar.

View File

@ -1,21 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample06.html
* Sample page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

View File

@ -1,21 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample07.html
* Sample page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

View File

@ -1,21 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample08.html
* Sample page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@ -122,14 +126,14 @@ function CheckIsDirty()
{
// Get the editor instance that we want to interact with.
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
alert( oEditor.IsDirty() ) ;
alert( oEditor.IsDirty() ) ;
}
function ResetIsDirty()
{
// Get the editor instance that we want to interact with.
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
oEditor.ResetIsDirty() ;
oEditor.ResetIsDirty() ;
alert( 'The "IsDirty" status has been reset' ) ;
}

View File

@ -1,21 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample09.html
* Sample page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

View File

@ -1,21 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample10.html
* Sample page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

View File

@ -1,21 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample11.html
* Sample page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

View File

@ -1,20 +1,24 @@
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample11_frame.html
* Sample page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
<!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

View File

@ -0,0 +1,127 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex, nofollow" />
<link href="../sample.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../fckeditor.js"></script>
<script type="text/javascript">
// The following function is used in this samples to reload the page,
// setting the querystring parameters for the enter mode.
function ChangeMode()
{
var sEnterMode = document.getElementById('xEnter').value ;
var sShiftEnterMode = document.getElementById('xShiftEnter').value ;
window.location.href = window.location.pathname + '?enter=' + sEnterMode + '&shift=' + sShiftEnterMode ;
}
</script>
</head>
<body>
<h1>
FCKeditor - JavaScript - Sample 12</h1>
<div>
This sample shows the different ways to configure the [Enter] key behavior on FCKeditor.
</div>
<hr />
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
When [Enter] is pressed:&nbsp;
</td>
<td>
<select id="xEnter" onchange="ChangeMode();">
<option value="p" selected="selected">Create new &lt;P&gt;</option>
<option value="div">Create new &lt;DIV&gt;</option>
<option value="br">Break the line with a &lt;BR&gt;</option>
</select>
</td>
</tr>
<tr>
<td>
When [Shift] + [Enter] is pressed:&nbsp;
</td>
<td>
<select id="xShiftEnter" onchange="ChangeMode();">
<option value="p">Create new &lt;P&gt;</option>
<option value="div">Create new &lt;DIV&gt;</option>
<option value="br" selected="selected">Break the line with a &lt;BR&gt;</option>
</select>
</td>
</tr>
</table>
<br />
<form action="sampleposteddata.asp" method="post" target="_blank">
<script type="text/javascript">
<!--
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;
// The following are the default configurations for the Enter and Shift+Enter modes.
var sEnterMode = 'p' ;
var sShiftEnterMode = 'br' ;
// Try to get the new configurations from the querystring, if available.
if ( document.location.search.length > 1 )
{
var aMatch = document.location.search.match( /enter=(p|div|br)/ ) ;
if ( aMatch )
sEnterMode = aMatch[1] ;
aMatch = document.location.search.match( /shift=(p|div|br)/ ) ;
if ( aMatch )
sShiftEnterMode = aMatch[1] ;
}
// Create the FCKeditor instance.
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
// Enable the Enter Key Handler. This feature will not be available in the release version.
oFCKeditor.Config["DisableEnterKeyHandler"] = false ;
// Set the configuration options for the Enter Key mode.
oFCKeditor.Config["EnterMode"] = sEnterMode ;
oFCKeditor.Config["ShiftEnterMode"] = sShiftEnterMode ;
oFCKeditor.Create() ;
// Update the select combos with the current values.
document.getElementById('xEnter').value = sEnterMode ;
document.getElementById('xShiftEnter').value = sShiftEnterMode ;
//-->
</script>
<br />
<input type="submit" value="Submit" />
</form>
</body>
</html>

View File

@ -0,0 +1,148 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex, nofollow" />
<link href="../sample.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../fckeditor.js"></script>
<script type="text/javascript">
function Toggle()
{
// Try to get the FCKeditor instance, if available.
var oEditor ;
if ( typeof( FCKeditorAPI ) != 'undefined' )
oEditor = FCKeditorAPI.GetInstance( '_DataFCKeditor' ) ;
// Get the _Textarea and _FCKeditor DIVs.
var eTextareaDiv = document.getElementById( '_Textarea' ) ;
var eFCKeditorDiv = document.getElementById( '_FCKeditor' ) ;
// If the _Textarea DIV is visible, switch to FCKeditor.
if ( eTextareaDiv.style.display != 'none' )
{
// If it is the first time, create the editor.
if ( !oEditor )
{
CreateEditor() ;
}
else
{
// Set the current text in the textarea to the editor.
oEditor.SetHTML( document.getElementById('_DataTextarea').value ) ;
}
// Switch the DIVs display.
eTextareaDiv.style.display = 'none' ;
eFCKeditorDiv.style.display = '' ;
// This is a hack for Gecko 1.0.x ... it stops editing when the editor is hidden.
if ( oEditor && !document.all )
{
if ( oEditor.EditMode == FCK_EDITMODE_WYSIWYG )
oEditor.MakeEditable() ;
}
}
else
{
// Set the textarea value to the editor value.
document.getElementById('_DataTextarea').value = oEditor.GetXHTML() ;
// Switch the DIVs display.
eTextareaDiv.style.display = '' ;
eFCKeditorDiv.style.display = 'none' ;
}
}
function CreateEditor()
{
// Copy the value of the current textarea, to the textarea that will be used by the editor.
document.getElementById('_DataFCKeditor').value = document.getElementById('_DataTextarea').value ;
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;
// Create an instance of FCKeditor (using the target textarea as the name).
var oFCKeditor = new FCKeditor( '_DataFCKeditor' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.Width = '100%' ;
oFCKeditor.Height = '350' ;
oFCKeditor.ReplaceTextarea() ;
}
// The FCKeditor_OnComplete function is a special function called everytime an
// editor instance is completely loaded and available for API interactions.
function FCKeditor_OnComplete( editorInstance )
{
// Enable the switch button. It is disabled at startup, waiting the editor to be loaded.
document.getElementById('_BtnSwitchTextarea').disabled = false ;
}
function PrepareSave()
{
// If the textarea isn't visible update the content from the editor.
if ( document.getElementById( '_Textarea' ).style.display == 'none' )
{
var oEditor = FCKeditorAPI.GetInstance( '_DataFCKeditor' ) ;
document.getElementById( '_DataTextarea' ).value = oEditor.GetXHTML() ;
}
}
</script>
</head>
<body>
<h1>
FCKeditor - JavaScript - Sample 13
</h1>
<div>
This sample starts with a normal textarea and provides the ability to switch back
and forth between the textarea and FCKeditor. It uses the JavaScript API to do the
operations so it will work even if the internal implementation changes.
</div>
<hr />
<form action="sampleposteddata.asp" method="post" target="_blank" onsubmit="PrepareSave();">
<div id="_Textarea">
<input type="button" value="Switch to FCKeditor" onclick="Toggle()" />
<br />
<br />
<textarea id="_DataTextarea" name="Data" cols="80" rows="20" style="width: 95%">This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://www.fckeditor.net/"&gt;FCKeditor&lt;/a&gt;.</textarea>
</div>
<div id="_FCKeditor" style="display: none">
<!-- Note that the following button is disabled at startup.
It will be enabled once the editor is completely loaded. -->
<input id="_BtnSwitchTextarea" type="button" disabled="disabled" value="Switch to Textarea" onclick="Toggle()" />
<br />
<br />
<!-- Note that the following textarea doesn't have a "name", so it will not be posted. -->
<textarea id="_DataFCKeditor" cols="80" rows="20"></textarea>
</div>
<br />
<input type="submit" value="Submit" />
</form>
</body>
</html>

View File

@ -1,21 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sampleposteddata.asp
* This page lists the data posted by a form.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* This page lists the data posted by a form.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

View File

@ -1,22 +1,26 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sampleposteddata.html
* This page lists the data posted by a form. It uses the URL (GET data),
* so it's limited to 2KB of data.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* This page lists the data posted by a form. It uses the URL (GET data),
* so it's limited to 2KB of data.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@ -65,7 +69,7 @@ for ( i = 0 ; i < aParams.length ; i++ )
document.write( '<tr>' ) ;
document.write( '<td valign="top" style="white-space: nowrap;">' + sParamName + '</td>' ) ;
document.write( '<td style="width: 100%;"><pre>' + HTMLEncode( unescape( sParamValue.replace( /\+/g, ' ' ) ) ) + '</pre></td>' ) ;
document.write( '<td style="width: 100%;"><pre>' + HTMLEncode( decodeURIComponent( sParamValue.replace( /\+/g, ' ' ) ) ) + '</pre></td>' ) ;
document.write( '</tr>' ) ;
}

View File

@ -1,21 +1,25 @@
[//lasso
[//lasso
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample01.lasso
* Sample page.
*
* File Authors:
* Jason Huck (jason.huck@corefive.com)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
*/
]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
@ -28,7 +32,7 @@
</head>
<body>
<h1>FCKeditor - Lasso - Sample 1</h1>
This sample displays a normal HTML form with an FCKeditor with full features
This sample displays a normal HTML form with an FCKeditor with full features
enabled.
<hr>
<form action="sampleposteddata.lasso" method="post" target="_blank">
@ -41,7 +45,7 @@
-basepath=$basepath,
-initialvalue='This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.'
);
$myeditor->create;
]
<br>

View File

@ -1,21 +1,25 @@
[//lasso
[//lasso
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample02.lasso
* Sample page.
*
* File Authors:
* Jason Huck (jason.huck@corefive.com)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
*/
]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
@ -35,7 +39,7 @@ function FCKeditor_OnComplete( editorInstance )
AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ;
}
oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
}
}
function AddComboOption(combo, optionText, optionValue)
{
@ -45,7 +49,7 @@ function AddComboOption(combo, optionText, optionValue)
oOption.innerHTML = optionText ;
oOption.value = optionValue ;
return oOption ;
}
@ -95,7 +99,7 @@ function ChangeLanguage( languageCode )
-config=$config,
-initialvalue='This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.'
);
$myeditor->create;
]
<br>

View File

@ -1,21 +1,25 @@
[//lasso
[//lasso
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample03.lasso
* Sample page.
*
* File Authors:
* Jason Huck (jason.huck@corefive.com)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
*/
]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
@ -73,7 +77,7 @@ function ChangeToolbar( toolbarName )
if(action_param('Toolbar'));
$myeditor->toolbarset = action_param('Toolbar');
/if;
$myeditor->create;
]
<br>

View File

@ -1,21 +1,25 @@
[//lasso
[//lasso
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample04.lasso
* Sample page.
*
* File Authors:
* Jason Huck (jason.huck@corefive.com)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
*/
]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
@ -30,11 +34,11 @@
function FCKeditor_OnComplete( editorInstance )
{
var oCombo = document.getElementById( 'cmbSkins' ) ;
// Get the active skin.
var sSkin = editorInstance.Config['SkinPath'] ;
sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
oCombo.value = sSkin ;
oCombo.style.visibility = '' ;
}
@ -75,11 +79,11 @@ function ChangeSkin( skinName )
-basepath=$basepath,
-initialvalue='This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.'
);
if(action_param('Skin'));
$myeditor->config = array('SkinPath' = $basepath + 'editor/skins/' + action_param('Skin') + '/');
/if;
$myeditor->create;
]
<br>

View File

@ -1,22 +1,25 @@
[//lasso
[//lasso
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sampleposteddata.lasso
* Sample page.
*
* File Authors:
* Jason Huck (jason.huck@corefive.com)
* Jim Michaels (jmichae3@yahoo.com)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
*/
]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

View File

@ -1,22 +1,26 @@
#!/usr/bin/env perl
#!/usr/bin/env perl
#####
# FCKeditor - The text editor for internet
# Copyright (C) 2003-2006 Frederico Caldeira Knabben
#
# Licensed under the terms of the GNU Lesser General Public License:
# http://www.opensource.org/licenses/lgpl-license.php
#
# For further information visit:
# http://www.fckeditor.net/
#
# "Support Open Source software. What about a donation today?"
#
# File Name: sample01.cgi
# Sample page.
#
# File Authors:
# Takashi Yamaguchi (jack@omakase.net)
# FCKeditor - The text editor for Internet - http://www.fckeditor.net
# Copyright (C) 2003-2007 Frederico Caldeira Knabben
#
# == BEGIN LICENSE ==
#
# Licensed under the terms of any of the following licenses at your
# choice:
#
# - GNU General Public License Version 2 or later (the "GPL")
# http://www.gnu.org/licenses/gpl.html
#
# - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
# http://www.gnu.org/licenses/lgpl.html
#
# - Mozilla Public License Version 1.1 or later (the "MPL")
# http://www.mozilla.org/MPL/MPL-1.1.html
#
# == END LICENSE ==
#
# Sample page.
#####
## START: Hack for Windows (Not important to understand the editor code... Perl specific).
@ -66,7 +70,7 @@ my $ServerPath;
</head>
<body>
<h1>FCKeditor - Perl - Sample 1</h1>
This sample displays a normal HTML form with an FCKeditor with full features
This sample displays a normal HTML form with an FCKeditor with full features
enabled.
<hr>
<form action="sampleposteddata.cgi" method="post" target="_blank">

View File

@ -1,22 +1,26 @@
#!/usr/bin/env perl
#!/usr/bin/env perl
#####
# FCKeditor - The text editor for internet
# Copyright (C) 2003-2006 Frederico Caldeira Knabben
#
# Licensed under the terms of the GNU Lesser General Public License:
# http://www.opensource.org/licenses/lgpl-license.php
#
# For further information visit:
# http://www.fckeditor.net/
#
# "Support Open Source software. What about a donation today?"
#
# File Name: sample02.cgi
# Sample page.
#
# File Authors:
# Takashi Yamaguchi (jack@omakase.net)
# FCKeditor - The text editor for Internet - http://www.fckeditor.net
# Copyright (C) 2003-2007 Frederico Caldeira Knabben
#
# == BEGIN LICENSE ==
#
# Licensed under the terms of any of the following licenses at your
# choice:
#
# - GNU General Public License Version 2 or later (the "GPL")
# http://www.gnu.org/licenses/gpl.html
#
# - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
# http://www.gnu.org/licenses/lgpl.html
#
# - Mozilla Public License Version 1.1 or later (the "MPL")
# http://www.mozilla.org/MPL/MPL-1.1.html
#
# == END LICENSE ==
#
# Sample page.
#####
## START: Hack for Windows (Not important to understand the editor code... Perl specific).
@ -90,7 +94,7 @@ function FCKeditor_OnComplete( editorInstance )
AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ;
}
oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
}
}
function AddComboOption(combo, optionText, optionValue)
{
@ -100,7 +104,7 @@ function AddComboOption(combo, optionText, optionValue)
oOption.innerHTML = optionText ;
oOption.value = optionValue ;
return oOption ;
}

View File

@ -1,22 +1,26 @@
#!/usr/bin/env perl
#!/usr/bin/env perl
#####
# FCKeditor - The text editor for internet
# Copyright (C) 2003-2006 Frederico Caldeira Knabben
#
# Licensed under the terms of the GNU Lesser General Public License:
# http://www.opensource.org/licenses/lgpl-license.php
#
# For further information visit:
# http://www.fckeditor.net/
#
# "Support Open Source software. What about a donation today?"
#
# File Name: sample03.cgi
# Sample page.
#
# File Authors:
# Takashi Yamaguchi (jack@omakase.net)
# FCKeditor - The text editor for Internet - http://www.fckeditor.net
# Copyright (C) 2003-2007 Frederico Caldeira Knabben
#
# == BEGIN LICENSE ==
#
# Licensed under the terms of any of the following licenses at your
# choice:
#
# - GNU General Public License Version 2 or later (the "GPL")
# http://www.gnu.org/licenses/gpl.html
#
# - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
# http://www.gnu.org/licenses/lgpl.html
#
# - Mozilla Public License Version 1.1 or later (the "MPL")
# http://www.mozilla.org/MPL/MPL-1.1.html
#
# == END LICENSE ==
#
# Sample page.
#####
## START: Hack for Windows (Not important to understand the editor code... Perl specific).

View File

@ -1,22 +1,26 @@
#!/usr/bin/env perl
#!/usr/bin/env perl
#####
# FCKeditor - The text editor for internet
# Copyright (C) 2003-2006 Frederico Caldeira Knabben
#
# Licensed under the terms of the GNU Lesser General Public License:
# http://www.opensource.org/licenses/lgpl-license.php
#
# For further information visit:
# http://www.fckeditor.net/
#
# "Support Open Source software. What about a donation today?"
#
# File Name: sample04.cgi
# Sample page.
#
# File Authors:
# Takashi Yamaguchi (jack@omakase.net)
# FCKeditor - The text editor for Internet - http://www.fckeditor.net
# Copyright (C) 2003-2007 Frederico Caldeira Knabben
#
# == BEGIN LICENSE ==
#
# Licensed under the terms of any of the following licenses at your
# choice:
#
# - GNU General Public License Version 2 or later (the "GPL")
# http://www.gnu.org/licenses/gpl.html
#
# - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
# http://www.gnu.org/licenses/lgpl.html
#
# - Mozilla Public License Version 1.1 or later (the "MPL")
# http://www.mozilla.org/MPL/MPL-1.1.html
#
# == END LICENSE ==
#
# Sample page.
#####
## START: Hack for Windows (Not important to understand the editor code... Perl specific).

View File

@ -1,22 +1,26 @@
#!/usr/bin/env perl
#!/usr/bin/env perl
#####
# FCKeditor - The text editor for internet
# Copyright (C) 2003-2006 Frederico Caldeira Knabben
#
# Licensed under the terms of the GNU Lesser General Public License:
# http://www.opensource.org/licenses/lgpl-license.php
#
# For further information visit:
# http://www.fckeditor.net/
#
# "Support Open Source software. What about a donation today?"
#
# File Name: sampleposteddata.cgi
# This page lists the data posted by a form.
#
# File Authors:
# Takashi Yamaguchi (jack@omakase.net)
# FCKeditor - The text editor for Internet - http://www.fckeditor.net
# Copyright (C) 2003-2007 Frederico Caldeira Knabben
#
# == BEGIN LICENSE ==
#
# Licensed under the terms of any of the following licenses at your
# choice:
#
# - GNU General Public License Version 2 or later (the "GPL")
# http://www.gnu.org/licenses/gpl.html
#
# - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
# http://www.gnu.org/licenses/lgpl.html
#
# - Mozilla Public License Version 1.1 or later (the "MPL")
# http://www.mozilla.org/MPL/MPL-1.1.html
#
# == END LICENSE ==
#
# This page lists the data posted by a form.
#####
## START: Hack for Windows (Not important to understand the editor code... Perl specific).

View File

@ -1,21 +1,25 @@
<?php
<?php
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample01.php
* Sample page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
*/
include("../../fckeditor.php") ;
@ -30,7 +34,7 @@ include("../../fckeditor.php") ;
</head>
<body>
<h1>FCKeditor - PHP - Sample 1</h1>
This sample displays a normal HTML form with an FCKeditor with full features
This sample displays a normal HTML form with an FCKeditor with full features
enabled.
<hr>
<form action="sampleposteddata.php" method="post" target="_blank">

View File

@ -1,21 +1,25 @@
<?php
<?php
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample02.php
* Sample page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
*/
include("../../fckeditor.php") ;
@ -37,7 +41,7 @@ function FCKeditor_OnComplete( editorInstance )
AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ;
}
oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
}
}
function AddComboOption(combo, optionText, optionValue)
{
@ -47,7 +51,7 @@ function AddComboOption(combo, optionText, optionValue)
oOption.innerHTML = optionText ;
oOption.value = optionValue ;
return oOption ;
}

View File

@ -1,21 +1,25 @@
<?php
<?php
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample03.php
* Sample page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
*/
include("../../fckeditor.php") ;

View File

@ -1,21 +1,25 @@
<?php
<?php
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample04.php
* Sample page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Sample page.
*/
include("../../fckeditor.php") ;
@ -32,11 +36,11 @@ include("../../fckeditor.php") ;
function FCKeditor_OnComplete( editorInstance )
{
var oCombo = document.getElementById( 'cmbSkins' ) ;
// Get the active skin.
var sSkin = editorInstance.Config['SkinPath'] ;
sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
oCombo.value = sSkin ;
oCombo.style.visibility = '' ;
}

View File

@ -1,22 +1,25 @@
<?php
<?php
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sampleposteddata.php
* This page lists the data posted by a form.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* Jim Michaels (jmichae3@yahoo.com)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* This page lists the data posted by a form.
*/
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
@ -45,7 +48,10 @@ else
foreach ( $postArray as $sForm => $value )
{
$postedValue = htmlspecialchars( stripslashes( $value ) ) ;
if ( get_magic_quotes_gpc() )
$postedValue = htmlspecialchars( stripslashes( $value ) ) ;
else
$postedValue = htmlspecialchars( $value ) ;
?>
<tr>

View File

@ -1,22 +1,26 @@
#!/usr/bin/env python
#!/usr/bin/env python
"""
FCKeditor - The text editor for internet
Copyright (C) 2003-2006 Frederico Caldeira Knabben
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2007 Frederico Caldeira Knabben
Licensed under the terms of the GNU Lesser General Public License:
http://www.opensource.org/licenses/lgpl-license.php
== BEGIN LICENSE ==
For further information visit:
http://www.fckeditor.net/
Licensed under the terms of any of the following licenses at your
choice:
"Support Open Source software. What about a donation today?"
- GNU General Public License Version 2 or later (the "GPL")
http://www.gnu.org/licenses/gpl.html
File Name: sample01.py
Sample page.
- GNU Lesser General Public License Version 2.1 or later (the "LGPL")
http://www.gnu.org/licenses/lgpl.html
File Authors:
Andrew Liu (andrew@liuholdings.com)
- Mozilla Public License Version 1.1 or later (the "MPL")
http://www.mozilla.org/MPL/MPL-1.1.html
== END LICENSE ==
Sample page.
"""
import cgi
@ -40,14 +44,14 @@ print """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
</head>
<body>
<h1>FCKeditor - Python - Sample 1</h1>
This sample displays a normal HTML form with an FCKeditor with full features
This sample displays a normal HTML form with an FCKeditor with full features
enabled.
<hr>
<form action="sampleposteddata.py" method="post" target="_blank">
"""
# This is the real work
try:
try:
sBasePath = os.environ.get("SCRIPT_NAME")
sBasePath = sBasePath[0:sBasePath.find("_samples")]

View File

@ -1,22 +1,26 @@
#!/usr/bin/env python
#!/usr/bin/env python
"""
FCKeditor - The text editor for internet
Copyright (C) 2003-2006 Frederico Caldeira Knabben
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2007 Frederico Caldeira Knabben
Licensed under the terms of the GNU Lesser General Public License:
http://www.opensource.org/licenses/lgpl-license.php
== BEGIN LICENSE ==
For further information visit:
http://www.fckeditor.net/
Licensed under the terms of any of the following licenses at your
choice:
"Support Open Source software. What about a donation today?"
- GNU General Public License Version 2 or later (the "GPL")
http://www.gnu.org/licenses/gpl.html
File Name: sampleposteddata.py
This page lists the data posted by a form.
- GNU Lesser General Public License Version 2.1 or later (the "LGPL")
http://www.gnu.org/licenses/lgpl.html
File Authors:
Andrew Liu (andrew@liuholdings.com)
- Mozilla Public License Version 1.1 or later (the "MPL")
http://www.mozilla.org/MPL/MPL-1.1.html
== END LICENSE ==
This page lists the data posted by a form.
"""
import cgi
@ -44,7 +48,7 @@ print """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<body>
"""
# This is the real work
# This is the real work
print """
<h1>FCKeditor - Samples - Posted Data</h1>
This page lists all data posted by the form.

View File

@ -1,20 +1,24 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sample.css
* Styles used in the samples pages.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Styles used in the samples pages.
*/
body, td, input, select, textarea

View File

@ -1,21 +1,25 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sampleslist.html
* Page used to select the sample to view.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Page used to select the sample to view.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@ -43,44 +47,74 @@ function OpenSample( sample )
Please select the sample you want to view:
<br />
<select onchange="OpenSample(this.value);">
<option value="html/sample01.html" selected="selected">JavaScript : Sample 01 : Editor
with all features</option>
<option value="html/sample02.html">JavaScript : Sample 02 : Replacement of a TEXTAREA</option>
<option value="html/sample03.html">JavaScript : Sample 03 : Multi-language support</option>
<option value="html/sample04.html">JavaScript : Sample 04 : Toolbar selection</option>
<option value="html/sample05.html">JavaScript : Sample 05 : Skins support</option>
<option value="html/sample06.html">JavaScript : Sample 06 : Plugins support</option>
<option value="html/sample07.html">JavaScript : Sample 07 : Full Page editing</option>
<option value="html/sample08.html">JavaScript : Sample 08 : Editor API usage</option>
<option value="html/sample09.html">JavaScript : Sample 09 : Complex form (multiple editors)</option>
<option value="html/sample10.html">JavaScript : Sample 10 : Shared toolbar on same page</option>
<option value="html/sample11.html">JavaScript : Sample 11 : Shared toolbar from IFRAME</option>
<option value=""></option>
<option value="cfm/sample01.cfm">ColdFusion : Sample 01 : Editor with all features</option>
<option value="cfm/sample02_mx.cfm">ColdFusion : Sample 02 : Advanced version for ColdFusion
MX</option>
<option value=""></option>
<option value="asp/sample01.asp">ASP : Sample 01 : Editor with all features</option>
<option value="asp/sample02.asp">ASP : Sample 02 : Multi-language support</option>
<option value="asp/sample03.asp">ASP : Sample 03 : Toolbar selection</option>
<option value="asp/sample04.asp">ASP : Sample 04 : Skins support</option>
<option value=""></option>
<option value="lasso/sample01.lasso">Lasso : Sample 01 : Editor with all features</option>
<option value="lasso/sample02.lasso">Lasso : Sample 02 : Multi-language support</option>
<option value="lasso/sample03.lasso">Lasso : Sample 03 : Toolbar selection</option>
<option value="lasso/sample04.lasso">Lasso : Sample 04 : Skins support</option>
<option value=""></option>
<option value="perl/sample01.cgi">Perl : Sample 01 : Editor with all features</option>
<option value="perl/sample02.cgi">Perl : Sample 02 : Multi-language support</option>
<option value="perl/sample03.cgi">Perl : Sample 03 : Toolbar selection</option>
<option value="perl/sample04.cgi">Perl : Sample 04 : Skins support</option>
<option value=""></option>
<option value="php/sample01.php">PHP : Sample 01 : Editor with all features</option>
<option value="php/sample02.php">PHP : Sample 02 : Multi-language support</option>
<option value="php/sample03.php">PHP : Sample 03 : Toolbar selection</option>
<option value="php/sample04.php">PHP : Sample 04 : Skins support</option>
<option value=""></option>
<option value="py/sample01.py">Python : Sample 01 : Editor with all features</option>
<optgroup label="JavaScript">
<option value="html/sample01.html" selected="selected">JavaScript : Sample 01 : Editor
with all features</option>
<option value="html/sample02.html">JavaScript : Sample 02 : Replacement of a TEXTAREA</option>
<option value="html/sample03.html">JavaScript : Sample 03 : Multi-language support</option>
<option value="html/sample04.html">JavaScript : Sample 04 : Toolbar selection</option>
<option value="html/sample05.html">JavaScript : Sample 05 : Skins support</option>
<option value="html/sample06.html">JavaScript : Sample 06 : Plugins support</option>
<option value="html/sample07.html">JavaScript : Sample 07 : Full Page editing</option>
<option value="html/sample08.html">JavaScript : Sample 08 : Editor API usage</option>
<option value="html/sample09.html">JavaScript : Sample 09 : Complex form (multiple editors)</option>
<option value="html/sample10.html">JavaScript : Sample 10 : Shared toolbar on same page</option>
<option value="html/sample11.html">JavaScript : Sample 11 : Shared toolbar from IFRAME</option>
<option value="html/sample12.html">JavaScript : Sample 12 : Enter key behavior</option>
<option value="html/sample13.html">JavaScript : Sample 13 : Dinamically switching with a Textarea</option>
</optgroup>
<optgroup label="&nbsp;">
</optgroup>
<optgroup label="Active Fox Pro">
<option value="afp/sample01.afp">AFP : Sample 01 : Editor with all features</option>
<option value="afp/sample02.afp">AFP : Sample 02 : Multi-language support</option>
<option value="afp/sample03.afp">AFP : Sample 03 : Toolbar selection</option>
<option value="afp/sample04.afp">AFP : Sample 04 : Skins support</option>
</optgroup>
<optgroup label="&nbsp;">
</optgroup>
<optgroup label="ASP">
<option value="asp/sample01.asp">ASP : Sample 01 : Editor with all features</option>
<option value="asp/sample02.asp">ASP : Sample 02 : Multi-language support</option>
<option value="asp/sample03.asp">ASP : Sample 03 : Toolbar selection</option>
<option value="asp/sample04.asp">ASP : Sample 04 : Skins support</option>
</optgroup>
<optgroup label="&nbsp;">
</optgroup>
<optgroup label="ColdFusion">
<option value="cfm/sample01.cfm">ColdFusion : Sample 01 : Editor with all features</option>
<option value="cfm/sample02_mx.cfm">ColdFusion : Sample 02 : Advanced version for ColdFusion
MX</option>
</optgroup>
<optgroup label="&nbsp;">
</optgroup>
<optgroup label="Lasso">
<option value="lasso/sample01.lasso">Lasso : Sample 01 : Editor with all features</option>
<option value="lasso/sample02.lasso">Lasso : Sample 02 : Multi-language support</option>
<option value="lasso/sample03.lasso">Lasso : Sample 03 : Toolbar selection</option>
<option value="lasso/sample04.lasso">Lasso : Sample 04 : Skins support</option>
</optgroup>
<optgroup label="&nbsp;">
</optgroup>
<optgroup label="Perl">
<option value="perl/sample01.cgi">Perl : Sample 01 : Editor with all features</option>
<option value="perl/sample02.cgi">Perl : Sample 02 : Multi-language support</option>
<option value="perl/sample03.cgi">Perl : Sample 03 : Toolbar selection</option>
<option value="perl/sample04.cgi">Perl : Sample 04 : Skins support</option>
</optgroup>
<optgroup label="&nbsp;">
</optgroup>
<optgroup label="PHP">
<option value="php/sample01.php">PHP : Sample 01 : Editor with all features</option>
<option value="php/sample02.php">PHP : Sample 02 : Multi-language support</option>
<option value="php/sample03.php">PHP : Sample 03 : Toolbar selection</option>
<option value="php/sample04.php">PHP : Sample 04 : Skins support</option>
</optgroup>
<optgroup label="&nbsp;">
</optgroup>
<optgroup label="Python">
<option value="py/sample01.py">Python : Sample 01 : Editor with all features</option>
</optgroup>
</select>
</td>
</tr>

View File

@ -1,72 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: 001.html
* Test page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
-->
<html>
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
<link href="testcases.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../fckeditor.js"></script>
<script>
function SubmitForm()
{
document.forms[0].submit() ;
}
</script>
</head>
<body>
<h1>
FCKeditor - Test 001</h1>
<p>
<strong>Expected results</strong>: The editor content must be loaded and the submit
button must post the editors html.<br>
<strong>Configurations</strong>: Default<br>
<strong>Steps to&nbsp;Reproduce</strong>:
</p>
<ol>
<li>Wait the editor to load.</li>
<li>Hit the "submit" button and check the posted data.</li>
<li>Hit the "submit by code" button and check the posted data.</li>
</ol>
<p>
<hr>
</p>
<form action="sampleposteddata.asp" method="post" target="_blank">
<script type="text/javascript">
<!--
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
oFCKeditor.Create() ;
//-->
</script>
<br>
<input type="submit" value="Submit">
<input type="button" value="Submit by Code" onclick="SubmitForm();">
</form>
</body>
</html>

View File

@ -1,70 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: 002.html
* Test page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
-->
<html>
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
<link href="testcases.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../fckeditor.js"></script>
</head>
<body>
<h1>FCKeditor - Test 002</h1>
<P><STRONG>Expected results</STRONG>: The editor must work correctly when not value
has been set<BR>
<STRONG>Configurations</STRONG>: Default<BR>
<STRONG>Steps to Reproduce</STRONG>:
</P>
<OL>
<LI>
Wait the editor to load.
<LI>
Type some text and format it (use the "Bold" and&nbsp;"Style" commands).
<LI>
Check the toolbar buttons context sensitiveness.
<LI>
Switch to Source mode.
<LI>
Repeat steps 2, 3 and 4.
<LI>
Hit submit button and check the submitted data.
</LI>
</OL>
<P>
<hr>
<P></P>
<form action="sampleposteddata.asp" method="post" target="_blank">
<script type="text/javascript">
<!--
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.Create() ;
//-->
</script>
<br>
<input type="submit" value="Submit">
</form>
</body>
</html>

View File

@ -1,72 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: 003.html
* Test page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
-->
<html>
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
<link href="testcases.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../fckeditor.js"></script>
</head>
<body>
<h1>FCKeditor - Test 003</h1>
<P><STRONG>Expected results</STRONG>: The user must be able to edit the complete
page html.<BR>
<STRONG>Configurations</STRONG>: FullPage = true ;<BR>
<STRONG>Steps to Reproduce</STRONG>:
</P>
<OL>
<LI>
Wait the editor to load.
<LI>
Type some text.
<LI>
Switch to Source mode.
<LI>
Switch back to WYSIWYG mode.
<LI>
Repeat steps 2, 3 and 4.
<LI>
Hit submit button and check the submitted data.
</LI>
</OL>
<P>
<hr>
<P></P>
<form action="sampleposteddata.asp" method="post" target="_blank">
<script type="text/javascript">
<!--
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.Config["FullPage"] = true ;
oFCKeditor.Value = '<html>\n\n<head><title></title></head><body>This is a Full Page editing Test:<br/>This is an image: <img src="' + sBasePath + 'editor/images/smiley/msn/lightbulb.gif" alt=""/></body></html>' ;
oFCKeditor.Create() ;
//-->
</script>
<br>
<input type="submit" value="Submit">
</form>
</body>
</html>

View File

@ -1,105 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: 004.html
* Test page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
-->
<html>
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
<link href="testcases.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../fckeditor.js"></script>
<script language="javascript">
function Show()
{
document.getElementById('eEditor').style.display = '' ;
document.getElementById('eNoEditor').style.display = 'none' ;
// This is a hack for Gecko... it stops editing when the editor is hidden.
if ( !document.all )
{
var oEditor = FCKeditorAPI.GetInstance( 'FCKeditor1' ) ;
if ( oEditor.EditMode == FCK_EDITMODE_WYSIWYG )
oEditor.MakeEditable() ;
}
}
function Hide()
{
document.getElementById('eEditor').style.display = 'none' ;
document.getElementById('eNoEditor').style.display = '' ;
}
</script>
</head>
<body>
<h1 id="Prova">FCKeditor - Test 004</h1>
<P>
<STRONG>Expected results</STRONG> : The editor must still work when hidding it
programmatically (through javascript).<BR>
<STRONG>Configurations</STRONG>: Default<BR>
<STRONG>Steps to&nbsp;Reproduce</STRONG>:
</P>
<OL>
<LI>
Wait the page to load.
<LI>
Hit the "Show Editor" button.
<LI>
Insert some text and format it.
<LI>
Hit the "Hide Editor" button.
<LI>
Hit the "Submit" and check the posted HTML.
<LI>
Close the "Submit" window.
<LI>
Hit the "Show Editor" button.
<LI>
Repeat steps 2 and 4.</LI></OL>
<P>
<hr>
<P></P>
<form action="sampleposteddata.asp" method="post" target="_blank">
<div id="eNoEditor">
<input type="button" value="Show Editor" onclick="Show();">
</div>
<div id="eEditor" style="DISPLAY: none">
<input type="button" value="Hide Editor" onclick="Hide();">
<br><br>
<script type="text/javascript">
<!--
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
oFCKeditor.Create() ;
//-->
</script>
</div>
<br>
<input type="submit" value="Submit">
</form>
</body>
</html>

View File

@ -1,68 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: 005.html
* Test page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
-->
<html>
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
<link href="testcases.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../fckeditor.js"></script>
</head>
<body>
<h1>FCKeditor - Test 005</h1>
<P>
<STRONG>Expected results</STRONG>: The editor content must be loaded and the
submit button must post the editors html. No javascript errors should be thrown
(security errors).<BR>
<STRONG>Configurations</STRONG>: BaseHref = http://www.fckeditor.net
<BR>
<STRONG>Steps to&nbsp;Reproduce</STRONG>:
</P>
<OL>
<LI>
Wait the editor to load.
<LI>
Create a table with border =
0&nbsp;and an anchor.
<LI>Create an image and points it to /images/logotop.gif
<LI>Hit submit button and check the posted data.</LI></OL>
<P>
<hr>
<P></P>
<form action="sampleposteddata.asp" method="post" target="_blank">
<script type="text/javascript">
<!--
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.Config['BaseHref'] = 'http://www.fckeditor.net' ;
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
oFCKeditor.Create() ;
//-->
</script>
<br>
<input type="submit" value="Submit">
</form>
</body>
</html>

View File

@ -1,75 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: 006.html
* Test page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
-->
<html>
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
<link href="testcases.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../fckeditor.js"></script>
</head>
<body>
<h1>FCKeditor - Test 006</h1>
<P>
<STRONG>Expected results</STRONG>: The editor content must be loaded and the
submit button must post the editors html. No javascript errors should be thorwn
(security errors).<BR>
<STRONG>Configurations</STRONG>: BaseHref = http://www.fckeditor.net / FullPage
= true
<BR>
<STRONG>Steps to&nbsp;Reproduce</STRONG>:
</P>
<OL>
<LI>
Wait the editor to load.
<LI>
Create a table with border = 0 and an anchor.
<LI>
Create an image and points it to /images/logotop.gif
<LI>
Paste the following CSS tag in the source: &lt;link href="/css/main.css" type="text/css" rel="stylesheet" /&gt;
<LI>
Check the WYSIWYG mode.
<LI>
Hit submit button and check the posted data.</LI></OL>
<P>
<hr>
<P></P>
<form action="sampleposteddata.asp" method="post" target="_blank">
<script type="text/javascript">
<!--
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.Config['FullPage'] = true ;
oFCKeditor.Config['BaseHref'] = 'http://www.fckeditor.net' ;
oFCKeditor.Value = '<html><head><title></title></head><body>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</body></html>' ;
oFCKeditor.Create() ;
//-->
</script>
<br>
<input type="submit" value="Submit">
</form>
</body>
</html>

View File

@ -1,64 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: 007.html
* Test Page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
-->
<html>
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
<link href="testcases.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../fckeditor.js"></script>
</head>
<body>
<h1>FCKeditor - Test 007</h1>
<P>
<STRONG>Expected results</STRONG>: The editor content must be loaded and the
submit button must post the editor's html.<BR>
<STRONG>Configurations</STRONG>: Default<BR>
<STRONG>Steps to&nbsp;Reproduce</STRONG>:
</P>
<OL>
<LI>
Wait the editor to load.
<LI>
Enter some text.
<LI>
Hit submit button and check the posted data.</LI></OL>
<P>
<hr>
<P></P>
<form action="sampleposteddata.asp" method="post" target="_blank">
<script type="text/javascript">
<!--
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.Value = '<div></div>' ;
oFCKeditor.Create() ;
//-->
</script>
<br>
<input type="submit" value="Submit">
</form>
</body>
</html>

View File

@ -1,83 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: 008.html
* Test page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex, nofollow" />
<link href="testcases.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../fckeditor.js"></script>
<script type="text/javascript">
function Validate()
{
// Get the editor instance that we want to interact with.
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
// Get the editor contents in XHTML.
if ( oEditor.GetXHTML( false ).length == 0 )
{
alert( 'The "Save" command must not submit if the editor is empty' ) ;
return false ;
}
}
</script>
</head>
<body>
<h1>
FCKeditor - Test 008</h1>
<p>
<strong>Expected results</strong>: The editor content must be loaded and the submit
button must post the editors html.<br />
<strong>Configurations</strong>: Default<br />
<strong>Steps to&nbsp;Reproduce</strong>:
</p>
<ol>
<li>Wait the editor to load.</li>
<li>Select all the content with the mouse and delete it.</li>
<li>Hit the "Save" button - an alert should popup.</li>
<li>Insert some text.</li>
<li>Hit the "Save" button and check the posted data.</li>
<li>Close the data window.</li>
<li>Press the "New Page" button.</li>
<li>Hit the "Save" button - an alert should popup.</li>
</ol>
<p>
<hr />
<p>
</p>
<form action="sampleposteddata.asp" method="post" target="_blank" onsubmit="return Validate();">
<script type="text/javascript">
<!--
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
oFCKeditor.Create() ;
//-->
</script>
</form>
</body>
</html>

View File

@ -1,109 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: 009.html
* Test page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
-->
<html>
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
<link href="testcases.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../fckeditor.js"></script>
<script>
function FCKeditor_OnComplete( editorInstance )
{
// Attach to the event fired when the editor's HTML is set.
editorInstance.Events.AttachEvent( 'OnAfterSetHTML', FCKeditor_OnAfterSetHTML ) ;
}
function FCKeditor_OnAfterSetHTML( editorInstance )
{
// Get the actual color from the combo.
var sColor = document.getElementById('ActualColor').value ;
// Set the color of the editor instance.
editorInstance.EditorDocument.body.style.backgroundColor = sColor ;
}
function SetActualColor()
{
// Get the editor instance that we want to interact with.
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
// Call the event function to set the color.
FCKeditor_OnAfterSetHTML( oEditor ) ;
}
</script>
</head>
<body>
<h1>FCKeditor - Test 009</h1>
<P>
<STRONG>Expected results</STRONG> : The user should be able to background color
of the editor by code.<BR>
<STRONG>Configurations</STRONG>: Default<BR>
<STRONG>Steps to&nbsp;Reproduce</STRONG>:
</P>
<OL>
<LI>
Wait the editor to load.
<LI>
Type some text.
<LI>
Change the background color using the combo.
<LI>
Type more text.
<LI>
Switch to source view.
<LI>
Switch back to WYSIWYG. The background color must be the same.
<LI>
Repeate steps 3 to 6.
<LI>
Submit the form.</LI></OL>
<P>
<hr>
<P>
Select a color for the background:<br>
<select id="ActualColor" onchange="SetActualColor();">
<option value="white" selected>White</option>
<option value="red">Red</option>
<option value="green">Green</option>
<option value="gold">Gold</option>
</select>
</P>
<form action="sampleposteddata.asp" method="post" target="_blank">
<script type="text/javascript">
<!--
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
oFCKeditor.Create() ;
//-->
</script>
<br>
<input type="submit" value="Submit">
</form>
</body>
</html>

View File

@ -1,89 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: 010.html
* Test page.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex, nofollow" />
<link href="testcases.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../fckeditor.js"></script>
<script type="text/javascript">
function SubmitForm()
{
document.forms[0].submit() ;
}
function SetToolbar( toolbarName )
{
// Get the editor instance that we want to interact with.
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
oEditor.ToolbarSet.Load( toolbarName ) ;
}
</script>
</head>
<body>
<h1>
FCKeditor - Test 010</h1>
<p>
<strong>Expected results</strong>: The editor content must be loaded and the the
user must be able to change the toolbar dinamically (without reloading the page).<br />
<strong>Configurations</strong>: Default<br />
<strong>Steps to&nbsp;Reproduce</strong>:
</p>
<ol>
<li>Wait the editor to load.</li>
<li>Select some text and format it.</li>
<li>Select the "Basic" toolbar.</li>
<li>Format more text.</li>
<li>Select the "Default" toolbar.</li>
<li>Go to "Source" view.</li>
<li>Select the "Basic" toolbar.</li>
<li>Select the "Default" toolbar.</li>
<li>Go to "WYSIWYG" view.</li>
<li>Hit submit button and check the posted data.</li></ol>
<hr />
<p>
Select the toolbar you want to load:<br />
<select onchange="SetToolbar( this.value );">
<option value="Default" selected="selected">Default</option>
<option value="Basic">Basic</option>
</select>
</p>
<form action="sampleposteddata.asp" method="post" target="_blank">
<script type="text/javascript">
<!--
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
oFCKeditor.Create() ;
//-->
</script>
<br />
<input type="submit" value="Submit" />
</form>
</body>
</html>

View File

@ -1,68 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: sampleposteddata.asp
* This page lists the data posted by a form.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>FCKeditor - Samples - Posted Data</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex, nofollow" />
<link href="testcases.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>
FCKeditor - Samples - Posted Data</h1>
<div>
This page lists all data posted by the form.
</div>
<hr />
<table width="100%" border="1" cellpadding="3" style="border-color: #999999; border-collapse: collapse;">
<tr style="font-weight: bold; color: #dddddd; background-color: #999999">
<td style="white-space: nowrap;">
Field Name&nbsp;&nbsp;</td>
<td>
Value</td>
</tr>
<% For Each sForm in Request.Form %>
<tr>
<td valign="top" style="white-space: nowrap;">
<b>
<%=sForm%>
</b>
</td>
<td style="width: 100%;">
<pre><%=ModifyForOutput( Request.Form(sForm) )%></pre>
</td>
</tr>
<% Next %>
</table>
</body>
</html>
<%
' This function is useful only for this sample page se whe can display the
' posted data accordingly. This processing is usually not done on real
' applications, where the posted data must be saved on a DB or file. In those
' cases, no processing must be done, and the data is saved as posted.
Function ModifyForOutput( value )
ModifyForOutput = Server.HTMLEncode( Request.Form(sForm) )
End Function
%>

View File

@ -1,46 +0,0 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: testcases.css
* Styles used in the samples pages.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
body, td, input, select, textarea
{
font-size: 12px;
font-family: Arial, Verdana, Sans-Serif;
}
h1
{
font-weight: bold;
font-size: 180%;
margin-bottom: 10px;
}
form
{
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
}
pre
{
margin:0px;
padding:0px;
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}

View File

@ -0,0 +1,38 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>FCKeditor - Upgrade</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body { font-family: arial, verdana, sans-serif }
p { margin-left: 20px }
</style>
</head>
<body>
<h1>
FCKeditor Upgrade</h1>
<p>
Please check the following URL for notes regarding upgrade: <a href="http://wiki.fckeditor.net/Developer%27s_Guide/Upgrade">
http://wiki.fckeditor.net/Developer%27s_Guide/Upgrade</a></p>
</body>
</html>

View File

@ -1,15 +1,23 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@ -21,6 +29,299 @@
</style>
</head>
<body>
<h3>
Version 2.4.1 (SVN)</h3>
<p>
New Features and Improvements:</p>
<ul>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/118">#118</a>] The SelectAll
command now is available in Source Mode.</li>
<li>The new open source FCKpackager sub-project is now available. It replaces the FCKeditor.Packager
software to compact the editor source.</li>
<li>With Firefox, if a paste execution is blocked by the browser security settings,
the new "Paste" popup is shown to the user to complete the pasting operation. </li>
</ul>
<p>
Fixed Bugs:</p>
<ul>
<li>Various fixes to the ColdFusion File Browser connector.</li>
<li>We are now pointing the download of ieSpell to their pages, instead to a direct
file download from one of their mirrors. This disables the ability of "click and
go" (which can still be achieved by pointing the download to a file in your server),
but removes any troubles with mirrors link changes (and they change it frequently).</li>
<li>The Word cleanup has been changed to remove "display:none" tags that may come from
Word.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1659613&group_id=75348">SF
BUG-1659613</a>] The 2.4 version introduced a bug in the flash handling code that
generated out of memory errors in IE7.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1660456&group_id=75348">SF
BUG-1660456</a>] The icons in context menus were draggable.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1653009&group_id=75348">SF
BUG-1653009</a>] If the server is configured to process html files as asp then it
generated ASP error 0138.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1288609&group_id=75348">SF
BUG-1288609</a>] The content of iframes is now preserved.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1245504&group_id=75348">SF
BUG-1245504</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1652240&group_id=75348">SF
BUG-1652240</a>] Flash files without the .swf extension weren't recognized upon
reload.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1649753&group_id=75348&atid=543655">SF
PATCH-1649753</a>] Node selection for text didn't work in IE. Thanks to yurik dot
m.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1573191&group_id=75348&atid=543653">SF
BUG-1573191</a>] The Html code inserted with FCK.InsertHtml didn't have the same
protection for special tags.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/110">#110</a>] The OK
button in dialogs had its width set as an inline style.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/113">#113</a>] [<a
target="_blank" href="http://dev.fckeditor.net/ticket/94">#94</a>] [<a target="_blank"
href="https://sourceforge.net/tracker/?func=detail&aid=1659270&group_id=75348&atid=543653">SF
BUG-1659270</a>] ForcePasteAsPlainText didn't work in Firefox.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/114">#114</a>] The correct
entity is now used to fill empty blocks when ProcessHTMLEntities is disabled.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/90">#90</a>] The editor
was wrongly removing some &lt;br&gt; tags from the code.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/139">#139</a>] The CTRL+F
and CTRL+S keystroke default behaviors are now preserved.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/138">#138</a>] We are
not providing a CTRL + ALT combination in the default configuration file because
it may be incompatible with some keyboard layouts. So, the CTRL + ALT + S combination
has been changed to CTRL + SHIFT + S.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/129">#129</a>] In IE,
it was not possible to paste if "Allow paste operation via script" was disabled
in the browser security settings.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/112">#112</a>] The enter
key now behaves correctly on lists with Firefox, when the EnterMode is set to 'br'.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/152">#152</a>] Invalid
self-closing tags are now being fixed before loading. </li>
<li>A few tags were being ignored to the check for required contents (not getting stripped
out, as expected). Fixed.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/202">#202</a>] The HR
tag will not anymore break the contents loaded in the editor.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/211">#211</a>] Some invalid
inputs, like "&lt;p&gt;" where making the caret disappear in Firefox.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/99">#99</a>] The &lt;div&gt;
element is now considered a block container if EnterMode=p|br. It acts like a simple
block only if EnterMode=div.</li>
<li>Hidden fields will now show up as an icon in IE, instead of a normal text field.
They are also selectable and draggable, in all browsers.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/213">#213</a>] Styles
are now preserved when hitting enter at the end of a paragraph.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/77">#77</a>] If ShiftEnterMode
is set to a block tag (p or div), the desired block creation in now enforced, instead
of copying the current block (which is still the behavior of the simple enter).</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/209">#209</a>] Links and
images URLs will now be correctly preserved with Netscape 7.1.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/165">#165</a>] The enter
key now honors the EnterMode settings when outdenting a list item.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/190">#190</a>] Toolbars
may be wrongly positioned. Fixed.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/254">#254</a>] The IgnoreEmptyParagraphValue
setting is now correctly handled in Firefox.</li>
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/254">#248</a>] The behavior
of the backspace key has been fixed on some very specific cases.</li>
</ul>
<h3>
Version 2.4</h3>
<p>
New Features and Improvements:</p>
<ul>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1329273&group_id=75348&atid=543656">SF
Feature-1329273</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1456005&group_id=75348&atid=543656">SF
Feature-1456005</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1315002&group_id=75348&atid=543653">SF
BUG-1315002</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1350180&group_id=75348&atid=543653">SF
BUG-1350180</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1450689&group_id=75348&atid=543653">SF
BUG-1450689</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1461033&group_id=75348&atid=543653">SF
BUG-1461033</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1510111&group_id=75348&atid=543653">SF
BUG-1510111</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1203560&group_id=75348&atid=543653">SF
BUG-1203560</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1564838&group_id=75348&atid=543653">SF
BUG-1564838</a>] The advance <strong>Enter Key Handler</strong>
is now being introduced. It gives you complete freedom to configure the editor to
generate <strong>&lt;p&gt;, &lt;div&gt; or &lt;br&gt;</strong> when the user uses
both the [Enter] and [Shift]+[Enter] keys. The new "EnterMode" and "ShiftEnterMode"
settings can be use to control its behavior. It also guarantees that all browsers
will generate the same output. </li>
<li>The new and powerful <strong>Keyboard Accelerator System</strong> is being introduced.
You can now precisely control the commands to execute when some key combinations
are activated by the user. It guarantees that all browsers will have the same behavior
regarding the shortcuts.<br />
It also makes it possible to remove buttons from the toolbar and still invoke their
features by using the keyboard instead.
<br />
It also blocks all default "CTRL based shortcuts" imposed by the browsers, so if
you don't want users to underline text, just remove the CTRL+U combination from
the keystrokes table. Take a look at the FCKConfig.Keystrokes setting in the fckconfig.js
file. </li>
<li>The new "<strong>ProtectedTags</strong>" configuration option is being introduced.
It will accept a list of tags (separated by a pipe "|"), which will have no effect
during editing, but will still be part of the document DOM. This can be used mainly
for non HTML standard, custom tags.</li>
<li>Dialog box commands can now open resizable dialogs (by setting oCommand.Resizable
= true).</li>
<li>Updated support for AFP. Thanks to Soenke Freitag.</li>
<li>New language file:<ul>
<li><strong>Afrikaans</strong> (by Willem Petrus Botha). </li>
</ul>
</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1456343&group_id=75348&atid=543655">SF
Patch-1456343</a>] New sample file showing how to dynamically exchange a textarea
and an instance of FCKeditor. Thanks to Finn Hakansson</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1496115&group_id=75348&atid=543655">SF
Patch-1496115</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1588578&group_id=75348&atid=543653">SF
BUG-1588578</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1376534&group_id=75348&atid=543653">SF
BUG-1376534</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1343506&group_id=75348&atid=543653">SF
BUG-1343506</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1211065&group_id=75348&atid=543656">SF
Feature-1211065</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=949144&group_id=75348&atid=543656">SF
Feature-949144</a>] The content of anchors are shown and preserved
on creation. * </li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1587175&group_id=75348&atid=543656">SF
Feature-1587175</a>] Local links to an anchor are readjusted if the anchor changes.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1500040&group_id=75348&atid=543655">SF
Patch-1500040</a>] New configuration values to specify the Id and Class for the
body element.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1577202&group_id=75348&atid=543655">SF
Patch-1577202</a>] The links created with the popup option now are accessible even
if the user has JavaScript disabled.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1443472&group_id=75348&atid=543655">SF
Patch-1443472</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1576488&group_id=75348&atid=543653">SF
BUG-1576488</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1334305&group_id=75348&atid=543653">SF
BUG-1334305</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1578312&group_id=75348&atid=543653">SF
BUG-1578312</a>] The Paste from Word clean up function can be configured
with FCKConfig.CleanWordKeepsStructure to preserve the markup as much as possible.
Thanks Jean-Charles ROGEZ. </li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1472654&group_id=75348&atid=543655">SF
Patch-1472654</a>] The server side script location for SpellerPages can now be set
in the configuration file, by using the SpellerPagesServerScript setting.</li>
<li><span style="color: #ff0000">Attention:</span> All connectors are now pointing by
default to the "/userfiles/" folder instead of "/UserFiles/" (case change). Also,
the inner folders for each type (file, image, flash and media) are all lower-cased
too.</li>
<li><span style="color: #ff0000">Attention:</span> The UseBROnCarriageReturn configuration
is not anymore valid. The EnterMode setting can now be used to precisely set the
enter key behavior.</li>
</ul>
<p>
Fixed Bugs:</p>
<ul>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1444937&group_id=75348">SF
BUG-1444937</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1274364&group_id=75348">SF
BUG-1274364</a>] Shortcut keys are now undoable correctly.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1015230&group_id=75348">SF
BUG-1015230</a>] Toolbar buttons now update their state on shortcut keys activation.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1485621&group_id=75348">SF
BUG-1485621</a>] It is now possible to precisely control which shortcut keys can
be used.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1573714&group_id=75348">SF
BUG-1573714</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1593323&group_id=75348">SF
BUG-1593323</a>] Paste was not working in IE if both AutoDetectPasteFromWord
and ForcePasteAsPlainText settings were set to "false". </li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1578306&group_id=75348">SF
BUG-1578306</a>] The context menu was wrongly positioned if the editing document
was set to render in strict mode. Thanks to Alfonso Martinez.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1567060&group_id=75348">SF
BUG-1567060</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1565902&group_id=75348">SF
BUG-1565902</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1440631&group_id=75348">SF
BUG-1440631</a>] IE was getting locked on some specific cases. Fixed.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1582859&group_id=75348">SF
BUG-1582859</a>] [<a target="_blank" href="http://sourceforge.net/tracker/index.php?func=detail&aid=1579507&group_id=75348&atid=543655">SF
Patch-1579507</a>] Firefox' spellchecker is now disabled during editing mode.
Thanks to Alfonso Martinez.</li>
<li>Fixed Safari and Opera detection system (for development purposes only).</li>
<li>Paste from Notepad was including font information in IE. Fixed.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1584092&group_id=75348">SF
BUG-1584092</a>] When replacing text area, names with spaces are now accepted.</li>
<li>Depending on the implementation of toolbar combos (mainly for custom plugins) the
editor area was loosing the focus when clicking in the combo label. Fixed.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1596937&group_id=75348&atid=543653">SF
BUG-1596937</a>] InsertHtml() was inserting the HTML outside the editor area on
some very specific cases.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1585548&group_id=75348">SF
BUG-1585548</a>] On very specific, rare and strange cases, the XHTML processor was
not working properly in IE. Fixed.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1584951&group_id=75348">SF
BUG-1584951</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1380598&group_id=75348">SF
BUG-1380598</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1198139&group_id=75348">SF
BUG-1198139</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1437318&group_id=75348">SF
BUG-1437318</a>] In Firefox, the style selector will not anymore delete
the contents when removing styles on specific cases.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1515441&group_id=75348">SF
BUG-1515441</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1451071&group_id=75348">SF
BUG-1451071</a>] The "Insert/Edit Link" and "Select All" buttons are now working
properly when the editor is running on a IE Modal dialog.</li>
<li>On some very rare cases, IE was throwing a memory error when hiding the context
menus. Fixed.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1526154&group_id=75348">SF
BUG-1526154</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1509208&group_id=75348&atid=543653">SF
BUG-1509208</a>] With Firefox, &lt;style&gt; tags defined in the source are
now preserved.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1535946&group_id=75348">SF
BUG-1535946</a>] The IE dialog system has been changed to better work with custom
dialogs.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1599520&group_id=75348">SF
BUG-1599520</a>] The table dialog was producing empty tags when leaving some of
its fields empty.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1599545&group_id=75348">SF
BUG-1599545</a>] HTML entities are now processed on attribute values too.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1598517&group_id=75348">SF
BUG-1598517</a>] Meta tags are now protected from execution during editing (avoiding
the "redirect" meta to be activated).</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1415601&group_id=75348">SF
BUG-1415601</a>] Firefox internals: styleWithCSS is used instead of the deprecated
useCSS whenever possible.</li>
<li>All JavaScript Core extension function have been renamed to "PascalCase" (some were
in "camelCase"). This may have impact on plugins that use any of those functions.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1592311&group_id=75348">SF
BUG-1592311</a>] Operations in the caption of tables are now working correctly in
both browsers.</li>
<li>Small interface fixes to the about box.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1604576&group_id=75348&atid=543655">SF
PATCH-1604576</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1604301&group_id=75348">SF
BUG-1604301</a>] Link creation failed in Firefox 3 alpha. Thanks to Arpad Borsos</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1577247&group_id=75348&atid=543653">SF
BUG-1577247</a>] Unneeded call to captureEvents and releaseEvents.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1610790&group_id=75348">SF
BUG-1610790</a>] On some specific situations, the call to form.submit(), in form
were FCKeditor has been unloaded by code, was throwing the "Can't execute code from
a freed script" error.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1613167&group_id=75348&atid=543653">SF
BUG-1613167</a>] If the configuration was missing the FCKConfig.AdditionalNumericEntities
entry an error appeared.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1590848&group_id=75348&atid=543653">SF
BUG-1590848</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1626360&group_id=75348&atid=543653">SF
BUG-1626360</a>] Cleaning of JavaScript strict warnings in the source code.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1559466&group_id=75348&atid=543653">SF
BUG-1559466</a>] The ol/ul list property window always searched first for a UL element.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1516008&group_id=75348&atid=543653">SF
BUG-1516008</a>] Class attribute in IE wasn't loaded in the image dialog.</li>
<li>The "OnAfterSetHTML" event is now fired when being/switching to Source View.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1631807&group_id=75348&atid=543653">SF
BUG-1631807</a>] Elements' style properties are now forced to lowercase in IE.</li>
<li>The extensions "html", "htm" and "asis" have been added to the list of denied extensions
on upload.</li>
<li>Empty inline elements (like span and strong) will not be generated any more.</li>
<li>Some elements attributes (like hspace) where not being retrieved when set to "0".</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1508341&group_id=75348&atid=543653">SF
BUG-1508341</a>] Fix for the ColdFusion script file of SpellerPages.</li>
</ul>
<p>
* This version has been partially sponsored by <a href="http://www.imedi.org/">Medical
Media Lab</a>.</p>
<h3>
Version 2.3.3</h3>
<p>
New Features and Improvements:</p>
<ul>
<li>The project has been <strong>relicensed</strong> under the terms of the <strong>
GPL / LGPL / MPL</strong> licenses. This change will remove many licensing compatibility
issues with other open source licenses, making the editor even more "open" than
before. </li>
<li><font color="#ff0000">Attention:</font> The default directory in the distribution
package is now named "fckeditor" (in lowercase) instead of "FCKeditor".&nbsp; This
change may impact installations on case sensitive OSs, like Linux. </li>
<li><font color="#ff0000">Attention:</font> The "Universal Keyboard" has been removed
from the package. The license of those files was unclear so they can't be included
alongside the rest of FCKeditor.</li>
</ul>
<h3>
Version 2.3.2</h3>
<p>
@ -261,8 +562,9 @@
New Features and Improvements:</p>
<ul>
<li>The <strong>Toolbar Sharing</strong> system has been completed. See sample10.html
and sample11.html.*</li><li>[<a target="_blank" href="https://sourceforge.net/tracker/index.php?func=detail&aid=1407500&group_id=75348&atid=543655">SF
Patch-1407500</a>] Small enhancement to the Find and Replace dialog windows.</li>
and sample11.html.*</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/index.php?func=detail&aid=1407500&group_id=75348&atid=543655">SF
Patch-1407500</a>] Small enhancement to the Find and Replace dialog windows.</li>
</ul>
<p>
Fixed Bugs:</p>
@ -272,8 +574,8 @@
</li>
<li>An error in the image preloader system was making the toolbar strip being downloaded
once for each button on slow connections. Some enhancements have also been made
so now the smaple05.html is loading fast for all skins.</li><li>Fixed many memory leak
issues with IE.</li>
so now the smaple05.html is loading fast for all skins.</li>
<li>Fixed many memory leak issues with IE.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/index.php?func=detail&aid=1489768&group_id=75348&atid=543653">SF
BUG-1489768</a>] The panels (context menus, toolbar combos and color selectors),
where being displayed in the wrong position if the contents of the editor, or its
@ -415,10 +717,11 @@
<ul>
<li><strong>Important security fixes have been applied to the File Manager, Uploader
and Connectors. Upgrade is highly recommended.</strong> Thanks to Alberto Moro,
Baudouin Lamourere and James Bercegay.</li><li>[<a target="_blank" href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1399966&amp;group_id=75348&amp;atid=543653">SF
BUG-1399966</a>] [<a target="_blank" href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1249853&amp;group_id=75348&amp;atid=543653">SF
BUG-1249853</a>] The &quot;BaseHref&quot; configuration is now working with
Firefox in both normal and full page modes.</li>
Baudouin Lamourere and James Bercegay.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1399966&amp;group_id=75348&amp;atid=543653">SF
BUG-1399966</a>] [<a target="_blank" href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1249853&amp;group_id=75348&amp;atid=543653">SF
BUG-1249853</a>] The &quot;BaseHref&quot; configuration is now working with
Firefox in both normal and full page modes.</li>
<li>[<a target="_blank" href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1405263&amp;group_id=75348&amp;atid=543653">SF
BUG-1405263</a>] A typo in the configuration file was impacting the Quick Upload
feature. </li>

View File

@ -1,35 +1,42 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: fckcontextmenu.js
* FCKContextMenu Class: renders an control a context menu.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* FCKContextMenu Class: renders an control a context menu.
*/
var FCKContextMenu = function( parentWindow, mouseClickWindow, langDir )
var FCKContextMenu = function( parentWindow, langDir )
{
var oPanel = this._Panel = new FCKPanel( parentWindow, true ) ;
oPanel.AppendStyleSheet( FCKConfig.SkinPath + 'fck_editor.css' ) ;
oPanel.IsContextMenu = true ;
// The FCKTools.DisableSelection doesn't seems to work to avoid dragging of the icons in Mozilla
// so we stop the start of the dragging
if ( FCKBrowserInfo.IsGecko )
oPanel.Document.addEventListener( 'draggesture', function(e) {e.preventDefault(); return false;}, true ) ;
var oMenuBlock = this._MenuBlock = new FCKMenuBlock() ;
oMenuBlock.Panel = oPanel ;
oMenuBlock.OnClick = FCKTools.CreateEventListener( FCKContextMenu_MenuBlock_OnClick, this ) ;
this._Redraw = true ;
this.SetMouseClickWindow( mouseClickWindow || parentWindow ) ;
}
@ -74,7 +81,7 @@ FCKContextMenu.prototype.AttachToElement = function( element )
function FCKContextMenu_Document_OnContextMenu( e )
{
var el = e.target ;
while ( el )
{
if ( el._FCKContextMenu )
@ -100,19 +107,23 @@ function FCKContextMenu_AttachedElement_OnContextMenu( ev, fckContextMenu, el )
if ( fckContextMenu._MenuBlock.Count() == 0 )
return false ;
if ( fckContextMenu._Redraw )
{
fckContextMenu._MenuBlock.Create( fckContextMenu._Panel.MainNode ) ;
fckContextMenu._Redraw = false ;
}
// This will avoid that the content of the context menu can be dragged in IE
// as the content of the panel is recreated we need to do it every time
FCKTools.DisableSelection( fckContextMenu._Panel.Document.body ) ;
fckContextMenu._Panel.Show(
ev.pageX || ev.screenX,
ev.pageY || ev.screenY,
fckContextMenu._Panel.Show(
ev.pageX || ev.screenX,
ev.pageY || ev.screenY,
ev.currentTarget || null
) ;
return false ;
}

View File

@ -0,0 +1,46 @@
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* This is a generic Document Fragment object. It is not intended to provide
* the W3C implementation, but is a way to fix the missing of a real Document
* Fragment in IE (where document.createDocumentFragment() returns a normal
* document instead), giving a standard interface for it.
* (IE Implementation)
*/
var FCKDocumentFragment = function( parentDocument, baseDocFrag )
{
this.RootNode = baseDocFrag || parentDocument.createDocumentFragment() ;
}
FCKDocumentFragment.prototype =
{
// Append the contents of this Document Fragment to another element.
AppendTo : function( targetNode )
{
targetNode.appendChild( this.RootNode ) ;
},
InsertAfterNode : function( existingNode )
{
FCKDomTools.InsertAfterNode( existingNode, this.RootNode ) ;
}
}

View File

@ -0,0 +1,58 @@
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* This is a generic Document Fragment object. It is not intended to provide
* the W3C implementation, but is a way to fix the missing of a real Document
* Fragment in IE (where document.createDocumentFragment() returns a normal
* document instead), giving a standard interface for it.
* (IE Implementation)
*/
var FCKDocumentFragment = function( parentDocument )
{
this._Document = parentDocument ;
this.RootNode = parentDocument.createElement( 'div' ) ;
}
// Append the contents of this Document Fragment to another node.
FCKDocumentFragment.prototype =
{
AppendTo : function( targetNode )
{
FCKDomTools.MoveChildren( this.RootNode, targetNode ) ;
},
AppendHtml : function( html )
{
var eTmpDiv = this._Document.createElement( 'div' ) ;
eTmpDiv.innerHTML = html ;
FCKDomTools.MoveChildren( eTmpDiv, this.RootNode ) ;
},
InsertAfterNode : function( existingNode )
{
var eRoot = this.RootNode ;
var eLast ;
while( ( eLast = eRoot.lastChild ) )
FCKDomTools.InsertAfterNode( existingNode, eRoot.removeChild( eLast ) ) ;
}
} ;

View File

@ -0,0 +1,452 @@
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Class for working with a selection range, much like the W3C DOM Range, but
* it is not intented to be an implementation of the W3C interface.
*/
var FCKDomRange = function( sourceWindow )
{
this.Window = sourceWindow ;
}
FCKDomRange.prototype =
{
_UpdateElementInfo : function()
{
if ( !this._Range )
this.Release( true ) ;
else
{
var eStart = this._Range.startContainer ;
var eEnd = this._Range.endContainer ;
var oElementPath = new FCKElementPath( eStart ) ;
this.StartContainer = oElementPath.LastElement ;
this.StartBlock = oElementPath.Block ;
this.StartBlockLimit = oElementPath.BlockLimit ;
if ( eStart != eEnd )
oElementPath = new FCKElementPath( eEnd ) ;
this.EndContainer = oElementPath.LastElement ;
this.EndBlock = oElementPath.Block ;
this.EndBlockLimit = oElementPath.BlockLimit ;
}
},
CreateRange : function()
{
return new FCKW3CRange( this.Window.document ) ;
},
DeleteContents : function()
{
if ( this._Range )
{
this._Range.deleteContents() ;
this._UpdateElementInfo() ;
}
},
ExtractContents : function()
{
if ( this._Range )
{
var docFrag = this._Range.extractContents() ;
this._UpdateElementInfo() ;
return docFrag ;
}
},
CheckIsCollapsed : function()
{
if ( this._Range )
return this._Range.collapsed ;
},
Collapse : function( toStart )
{
if ( this._Range )
this._Range.collapse( toStart ) ;
this._UpdateElementInfo() ;
},
Clone : function()
{
var oClone = FCKTools.CloneObject( this ) ;
if ( this._Range )
oClone._Range = this._Range.cloneRange() ;
return oClone ;
},
MoveToNodeContents : function( targetNode )
{
if ( !this._Range )
this._Range = this.CreateRange() ;
this._Range.selectNodeContents( targetNode ) ;
this._UpdateElementInfo() ;
},
MoveToElementStart : function( targetElement )
{
this.SetStart(targetElement,1) ;
this.SetEnd(targetElement,1) ;
},
// Moves to the first editing point inside a element. For example, in a
// element tree like "<p><b><i></i></b> Text</p>", the start editing point
// is "<p><b><i>^</i></b> Text</p>" (inside <i>).
MoveToElementEditStart : function( targetElement )
{
var child ;
while ( ( child = targetElement.firstChild ) && child.nodeType == 1 && FCKListsLib.EmptyElements[ child.nodeName.toLowerCase() ] == null )
targetElement = child ;
this.MoveToElementStart( targetElement ) ;
},
InsertNode : function( node )
{
if ( this._Range )
this._Range.insertNode( node ) ;
},
CheckIsEmpty : function( ignoreEndBRs )
{
if ( this.CheckIsCollapsed() )
return true ;
// Inserts the contents of the range in a div tag.
var eToolDiv = this.Window.document.createElement( 'div' ) ;
this._Range.cloneContents().AppendTo( eToolDiv ) ;
FCKDomTools.TrimNode( eToolDiv, ignoreEndBRs ) ;
return ( eToolDiv.innerHTML.length == 0 ) ;
},
CheckStartOfBlock : function()
{
// Create a clone of the current range.
var oTestRange = this.Clone() ;
// Collapse it to its start point.
oTestRange.Collapse( true ) ;
// Move the start boundary to the start of the block.
oTestRange.SetStart( oTestRange.StartBlock || oTestRange.StartBlockLimit, 1 ) ;
var bIsStartOfBlock = oTestRange.CheckIsEmpty() ;
oTestRange.Release() ;
return bIsStartOfBlock ;
},
CheckEndOfBlock : function( refreshSelection )
{
// Create a clone of the current range.
var oTestRange = this.Clone() ;
// Collapse it to its end point.
oTestRange.Collapse( false ) ;
// Move the end boundary to the end of the block.
oTestRange.SetEnd( oTestRange.EndBlock || oTestRange.EndBlockLimit, 2 ) ;
var bIsEndOfBlock = oTestRange.CheckIsCollapsed() ;
if ( !bIsEndOfBlock )
{
// Inserts the contents of the range in a div tag.
var eToolDiv = this.Window.document.createElement( 'div' ) ;
oTestRange._Range.cloneContents().AppendTo( eToolDiv ) ;
FCKDomTools.TrimNode( eToolDiv, true ) ;
// Find out if we are in an empty tree of inline elements, like <b><i><span></span></i></b>
bIsEndOfBlock = true ;
var eLastChild = eToolDiv ;
while ( ( eLastChild = eLastChild.lastChild ) )
{
// Check the following:
// 1. Is there more than one node in the parents children?
// 2. Is the node not an element node?
// 3. Is it not a inline element.
if ( eLastChild.previousSibling || eLastChild.nodeType != 1 || FCKListsLib.InlineChildReqElements[ eLastChild.nodeName.toLowerCase() ] == null )
{
// So we are not in the end of the range.
bIsEndOfBlock = false ;
break ;
}
}
}
oTestRange.Release() ;
if ( refreshSelection )
this.Select() ;
return bIsEndOfBlock ;
},
CreateBookmark : function()
{
// Create the bookmark info (random IDs).
var oBookmark =
{
StartId : 'fck_dom_range_start_' + (new Date()).valueOf() + '_' + Math.floor(Math.random()*1000),
EndId : 'fck_dom_range_end_' + (new Date()).valueOf() + '_' + Math.floor(Math.random()*1000)
} ;
var oDoc = this.Window.document ;
var eSpan ;
var oClone ;
// For collapsed ranges, add just the start marker.
if ( !this.CheckIsCollapsed() )
{
eSpan = oDoc.createElement( 'span' ) ;
eSpan.id = oBookmark.EndId ;
eSpan.innerHTML = '&nbsp;' ; // For IE, it must have something inside, otherwise it may be removed during operations.
oClone = this.Clone() ;
oClone.Collapse( false ) ;
oClone.InsertNode( eSpan ) ;
}
eSpan = oDoc.createElement( 'span' ) ;
eSpan.id = oBookmark.StartId ;
eSpan.innerHTML = '&nbsp;' ; // For IE, it must have something inside, otherwise it may be removed during operations.
oClone = this.Clone() ;
oClone.Collapse( true ) ;
oClone.InsertNode( eSpan ) ;
return oBookmark ;
},
MoveToBookmark : function( bookmark, preserveBookmark )
{
var oDoc = this.Window.document ;
var eStartSpan = oDoc.getElementById( bookmark.StartId ) ;
var eEndSpan = oDoc.getElementById( bookmark.EndId ) ;
this.SetStart( eStartSpan, 3 ) ;
if ( !preserveBookmark )
FCKDomTools.RemoveNode( eStartSpan ) ;
// If collapsed, the start span will not be available.
if ( eEndSpan )
{
this.SetEnd( eEndSpan, 3 ) ;
if ( !preserveBookmark )
FCKDomTools.RemoveNode( eEndSpan ) ;
}
else
this.Collapse( true ) ;
},
/*
* Moves the position of the start boundary of the range to a specific position
* relatively to a element.
* @position:
* 1 = After Start <target>^contents</target>
* 2 = Before End <target>contents^</target>
* 3 = Before Start ^<target>contents</target>
* 4 = After End <target>contents</target>^
*/
SetStart : function( targetElement, position )
{
var oRange = this._Range ;
if ( !oRange )
oRange = this._Range = this.CreateRange() ;
switch( position )
{
case 1 : // After Start <target>^contents</target>
oRange.setStart( targetElement, 0 ) ;
break ;
case 2 : // Before End <target>contents^</target>
oRange.setStart( targetElement, targetElement.childNodes.length ) ;
break ;
case 3 : // Before Start ^<target>contents</target>
oRange.setStartBefore( targetElement ) ;
break ;
case 4 : // After End <target>contents</target>^
oRange.setStartAfter( targetElement ) ;
}
this._UpdateElementInfo() ;
},
/*
* Moves the position of the start boundary of the range to a specific position
* relatively to a element.
* @position:
* 1 = After Start <target>^contents</target>
* 2 = Before End <target>contents^</target>
* 3 = Before Start ^<target>contents</target>
* 4 = After End <target>contents</target>^
*/
SetEnd : function( targetElement, position )
{
var oRange = this._Range ;
if ( !oRange )
oRange = this._Range = this.CreateRange() ;
switch( position )
{
case 1 : // After Start <target>^contents</target>
oRange.setEnd( targetElement, 0 ) ;
break ;
case 2 : // Before End <target>contents^</target>
oRange.setEnd( targetElement, targetElement.childNodes.length ) ;
break ;
case 3 : // Before Start ^<target>contents</target>
oRange.setEndBefore( targetElement ) ;
break ;
case 4 : // After End <target>contents</target>^
oRange.setEndAfter( targetElement ) ;
}
this._UpdateElementInfo() ;
},
Expand : function( unit )
{
var oNode, oSibling ;
switch ( unit )
{
case 'block_contents' :
if ( this.StartBlock )
this.SetStart( this.StartBlock, 1 ) ;
else
{
// Get the start node for the current range.
oNode = this._Range.startContainer ;
// If it is an element, get the current child node for the range (in the offset).
// If the offset node is not available, the the first one.
if ( oNode.nodeType == 1 )
{
if ( !( oNode = oNode.childNodes[ this._Range.startOffset ] ) )
oNode = oNode.firstChild ;
}
// Not able to defined the current position.
if ( !oNode )
return ;
// We must look for the left boundary, relative to the range
// start, which is limited by a block element.
while ( true )
{
oSibling = oNode.previousSibling ;
if ( !oSibling )
{
// Continue if we are not yet in the block limit (inside a <b>, for example).
if ( oNode.parentNode != this.StartBlockLimit )
oNode = oNode.parentNode ;
else
break ;
}
else if ( oSibling.nodeType != 1 || !(/^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|DT|DE)$/).test( oSibling.nodeName.toUpperCase() ) )
{
// Continue if the sibling is not a block tag.
oNode = oSibling ;
}
else
break ;
}
this._Range.setStartBefore( oNode ) ;
}
if ( this.EndBlock )
this.SetEnd( this.EndBlock, 2 ) ;
else
{
oNode = this._Range.endContainer ;
if ( oNode.nodeType == 1 )
oNode = oNode.childNodes[ this._Range.endOffset ] || oNode.lastChild ;
if ( !oNode )
return ;
// We must look for the right boundary, relative to the range
// end, which is limited by a block element.
while ( true )
{
oSibling = oNode.nextSibling ;
if ( !oSibling )
{
// Continue if we are not yet in the block limit (inide a <b>, for example).
if ( oNode.parentNode != this.EndBlockLimit )
oNode = oNode.parentNode ;
else
break ;
}
else if ( oSibling.nodeType != 1 || !(/^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|DT|DE)$/).test( oSibling.nodeName.toUpperCase() ) )
{
// Continue if the sibling is not a block tag.
oNode = oSibling ;
}
else
break ;
}
this._Range.setEndAfter( oNode ) ;
}
this._UpdateElementInfo() ;
}
},
Release : function( preserveWindow )
{
if ( !preserveWindow )
this.Window = null ;
this.StartContainer = null ;
this.StartBlock = null ;
this.StartBlockLimit = null ;
this.EndContainer = null ;
this.EndBlock = null ;
this.EndBlockLimit = null ;
this._Range = null ;
}
} ;

View File

@ -0,0 +1,71 @@
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Class for working with a selection range, much like the W3C DOM Range, but
* it is not intented to be an implementation of the W3C interface.
* (Gecko Implementation)
*/
FCKDomRange.prototype.MoveToSelection = function()
{
this.Release( true ) ;
var oSel = this.Window.getSelection() ;
if ( oSel.rangeCount == 1 )
{
this._Range = FCKW3CRange.CreateFromRange( this.Window.document, oSel.getRangeAt(0) ) ;
this._UpdateElementInfo() ;
}
}
FCKDomRange.prototype.Select = function()
{
var oRange = this._Range ;
if ( oRange )
{
var oDocRange = this.Window.document.createRange() ;
oDocRange.setStart( oRange.startContainer, oRange.startOffset ) ;
try
{
oDocRange.setEnd( oRange.endContainer, oRange.endOffset ) ;
}
catch ( e )
{
// There is a bug in Firefox implementation (it would be too easy
// otherwhise). The new start can't be after the end (W3C says it can).
// So, let's create a new range and collapse it to the desired point.
if ( e.toString().Contains( 'NS_ERROR_ILLEGAL_VALUE' ) )
{
oRange.collapse( true ) ;
oDocRange.setEnd( oRange.endContainer, oRange.endOffset ) ;
}
else
throw( e ) ;
}
var oSel = this.Window.getSelection() ;
oSel.removeAllRanges() ;
// We must add a clone otherwise Firefox will have rendering issues.
oSel.addRange( oDocRange ) ;
}
}

View File

@ -0,0 +1,149 @@
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Class for working with a selection range, much like the W3C DOM Range, but
* it is not intented to be an implementation of the W3C interface.
* (IE Implementation)
*/
FCKDomRange.prototype.MoveToSelection = function()
{
this.Release( true ) ;
this._Range = new FCKW3CRange( this.Window.document ) ;
var oSel = this.Window.document.selection ;
if ( oSel.type != 'Control' )
{
// Set the start boundary.
eMarker = this._GetSelectionMarkerTag( true ) ;
this._Range.setStart( eMarker.parentNode, FCKDomTools.GetIndexOf( eMarker ) ) ;
eMarker.parentNode.removeChild( eMarker ) ;
// Set the end boundary.
var eMarker = this._GetSelectionMarkerTag( false ) ;
this._Range.setEnd( eMarker.parentNode, FCKDomTools.GetIndexOf( eMarker ) ) ;
eMarker.parentNode.removeChild( eMarker ) ;
this._UpdateElementInfo() ;
}
else
{
var oControl = oSel.createRange().item(0) ;
if ( oControl )
{
this._Range.setStartBefore( oControl ) ;
this._Range.setEndAfter( oControl ) ;
this._UpdateElementInfo() ;
}
}
}
FCKDomRange.prototype.Select = function()
{
if ( this._Range )
{
var bIsCollapsed = this.CheckIsCollapsed() ;
// Create marker tags for the start and end boundaries.
var eStartMarker = this._GetRangeMarkerTag( true ) ;
if ( !bIsCollapsed )
var eEndMarker = this._GetRangeMarkerTag( false ) ;
// Create the main range which will be used for the selection.
var oIERange = this.Window.document.body.createTextRange() ;
// Position the range at the start boundary.
oIERange.moveToElementText( eStartMarker ) ;
oIERange.moveStart( 'character', 1 ) ;
if ( !bIsCollapsed )
{
// Create a tool range for the end.
var oIERangeEnd = this.Window.document.body.createTextRange() ;
// Position the tool range at the end.
oIERangeEnd.moveToElementText( eEndMarker ) ;
// Move the end boundary of the main range to match the tool range.
oIERange.setEndPoint( 'EndToEnd', oIERangeEnd ) ;
oIERange.moveEnd( 'character', -1 ) ;
}
// Remove the markers (reset the position, because of the changes in the DOM tree).
this._Range.setStartBefore( eStartMarker ) ;
eStartMarker.parentNode.removeChild( eStartMarker ) ;
if ( bIsCollapsed )
{
// The following trick is needed so IE makes collapsed selections
// inside empty blocks visible (expands the block).
try
{
oIERange.pasteHTML('&nbsp;') ;
oIERange.moveStart( 'character', -1 ) ;
}
catch (e){}
oIERange.select() ;
oIERange.pasteHTML('') ;
}
else
{
this._Range.setEndBefore( eEndMarker ) ;
eEndMarker.parentNode.removeChild( eEndMarker ) ;
oIERange.select() ;
}
}
}
FCKDomRange.prototype._GetSelectionMarkerTag = function( toStart )
{
// Get a range for the start boundary.
var oRange = this.Window.document.selection.createRange() ;
oRange.collapse( toStart === true ) ;
// Paste a marker element at the collapsed range and get it from the DOM.
var sMarkerId = 'fck_dom_range_temp_' + (new Date()).valueOf() + '_' + Math.floor(Math.random()*1000) ;
oRange.pasteHTML( '<span id="' + sMarkerId + '"></span>' ) ;
return this.Window.document.getElementById( sMarkerId ) ;
}
FCKDomRange.prototype._GetRangeMarkerTag = function( toStart )
{
// Get a range for the start boundary.
var oRange = this._Range ;
// insertNode() will add the node at the beginning of the Range, updating
// the endOffset if necessary. So, we can work with the current range in this case.
if ( !toStart )
{
oRange = oRange.cloneRange() ;
oRange.collapse( toStart === true ) ;
}
var eSpan = this.Window.document.createElement( 'span' ) ;
eSpan.innerHTML = '&nbsp;' ;
oRange.insertNode( eSpan ) ;
return eSpan ;
}

View File

@ -1,20 +1,24 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: fckeditingarea.js
* FCKEditingArea Class: renders an editable area.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* FCKEditingArea Class: renders an editable area.
*/
/**
@ -38,43 +42,64 @@ FCKEditingArea.prototype.Start = function( html, secondCall )
{
var eTargetElement = this.TargetElement ;
var oTargetDocument = FCKTools.GetElementDocument( eTargetElement ) ;
// Remove all child nodes from the target.
while( eTargetElement.childNodes.length > 0 )
eTargetElement.removeChild( eTargetElement.childNodes[0] ) ;
if ( this.Mode == FCK_EDITMODE_WYSIWYG )
{
if ( FCKBrowserInfo.IsGecko )
html = html.replace( /(<body[^>]*>)\s*(<\/body>)/i, '$1' + GECKO_BOGUS + '$2' ) ;
// Create the editing area IFRAME.
var oIFrame = this.IFrame = oTargetDocument.createElement( 'iframe' ) ;
oIFrame.src = 'javascript:void(0)' ;
oIFrame.frameBorder = 0 ;
oIFrame.width = oIFrame.height = '100%' ;
// Append the new IFRAME to the target.
eTargetElement.appendChild( oIFrame ) ;
// IE has a bug with the <base> tag... it must have a </base> closer,
// otherwise the all sucessive tags will be set as children nodes of the <base>.
if ( FCKBrowserInfo.IsIE )
html = html.replace( /(<base[^>]*?)\s*\/?>(?!\s*<\/base>)/gi, '$1></base>' ) ;
else if ( !secondCall )
{
// If nothing in the body, place a BOGUS tag so the cursor will appear.
if ( FCKBrowserInfo.IsGecko )
html = html.replace( /(<body[^>]*>)\s*(<\/body>)/i, '$1' + GECKO_BOGUS + '$2' ) ;
// Gecko moves some tags out of the body to the head, so we must use
// innerHTML to set the body contents (SF BUG 1526154).
// Extract the BODY contents from the html.
var oMatch = html.match( FCKRegexLib.BodyContents ) ;
if ( oMatch )
{
html =
oMatch[1] + // This is the HTML until the <body...> tag, inclusive.
'&nbsp;' +
oMatch[3] ; // This is the HTML from the </body> tag, inclusive.
this._BodyHTML = oMatch[2] ; // This is the BODY tag contents.
}
else
this._BodyHTML = html ; // Invalid HTML input.
}
// Get the window and document objects used to interact with the newly created IFRAME.
this.Window = oIFrame.contentWindow ;
// IE: Avoid JavaScript errors thrown by the editing are source (like tags events).
// TODO: This error handler is not being fired.
// this.Window.onerror = function() { alert( 'Error!' ) ; return true ; }
var oDoc = this.Document = this.Window.document ;
oDoc.open() ;
oDoc.write( html ) ;
oDoc.close() ;
// Firefox 1.0.x is buggy... ohh yes... so let's do it two times and it
// will magicaly work.
if ( FCKBrowserInfo.IsGecko10 && !secondCall )
@ -82,9 +107,9 @@ FCKEditingArea.prototype.Start = function( html, secondCall )
this.Start( html, true ) ;
return ;
}
this.Window._FCKEditingArea = this ;
// FF 1.0.x is buggy... we must wait a lot to enable editing because
// sometimes the content simply disappears, for example when pasting
// "bla1!<img src='some_url'>!bla2" in the source and then switching
@ -96,7 +121,7 @@ FCKEditingArea.prototype.Start = function( html, secondCall )
}
else
{
var eTextarea = this.Textarea = oTargetDocument.createElement( 'textarea' ) ;
var eTextarea = this.Textarea = oTargetDocument.createElement( 'textarea' ) ;
eTextarea.className = 'SourceField' ;
eTextarea.dir = 'ltr' ;
eTextarea.style.width = eTextarea.style.height = '100%' ;
@ -110,7 +135,7 @@ FCKEditingArea.prototype.Start = function( html, secondCall )
}
}
// "this" here is FCKEditingArea.Window
// "this" here is FCKEditingArea.Window
function FCKEditingArea_CompleteStart()
{
// Of Firefox, the DOM takes a little to become available. So we must wait for it in a loop.
@ -119,10 +144,10 @@ function FCKEditingArea_CompleteStart()
this.setTimeout( FCKEditingArea_CompleteStart, 50 ) ;
return ;
}
var oEditorArea = this._FCKEditingArea ;
oEditorArea.MakeEditable() ;
// Fire the "OnLoad" event.
FCKTools.RunFunction( oEditorArea.OnLoad ) ;
}
@ -132,25 +157,50 @@ FCKEditingArea.prototype.MakeEditable = function()
var oDoc = this.Document ;
if ( FCKBrowserInfo.IsIE )
{
oDoc.body.contentEditable = true ;
/* The following commands don't throw errors, but have no effect.
oDoc.execCommand( 'AutoDetect', false, false ) ;
oDoc.execCommand( 'KeepSelection', false, true ) ;
*/
}
else
{
try
{
// Disable Firefox 2 Spell Checker.
oDoc.body.spellcheck = ( this.FFSpellChecker !== false ) ;
if ( this._BodyHTML )
{
oDoc.body.innerHTML = this._BodyHTML ;
this._BodyHTML = null ;
}
oDoc.designMode = 'on' ;
// Tell Gecko to use or not the <SPAN> tag for the bold, italic and underline.
oDoc.execCommand( 'useCSS', false, !FCKConfig.GeckoUseSPAN ) ;
try
{
oDoc.execCommand( 'styleWithCSS', false, FCKConfig.GeckoUseSPAN ) ;
}
catch (e)
{
// As evidenced here, useCSS is deprecated in favor of styleWithCSS:
// http://www.mozilla.org/editor/midas-spec.html
oDoc.execCommand( 'useCSS', false, !FCKConfig.GeckoUseSPAN ) ;
}
// Analysing Firefox 1.5 source code, it seams that there is support for a
// "insertBrOnReturn" command. Applying it gives no error, but it doesn't
// Analysing Firefox 1.5 source code, it seams that there is support for a
// "insertBrOnReturn" command. Applying it gives no error, but it doesn't
// gives the same behavior that you have with IE. It works only if you are
// already inside a paragraph and it doesn't render correctly in the first enter.
// oDoc.execCommand( 'insertBrOnReturn', false, false ) ;
// Tell Gecko (Firefox 1.5+) to enable or not live resizing of objects (by Alfonso Martinez)
oDoc.execCommand( 'enableObjectResizing', false, !FCKConfig.DisableObjectResizing ) ;
// Disable the standard table editing features of Firefox.
oDoc.execCommand( 'enableInlineTableEditing', false, !FCKConfig.DisableFFTableHandles ) ;
}
@ -164,13 +214,26 @@ FCKEditingArea.prototype.Focus = function()
{
if ( this.Mode == FCK_EDITMODE_WYSIWYG )
{
// The following check is important to avoid IE entering in a focus loop. Ref:
// http://sourceforge.net/tracker/index.php?func=detail&aid=1567060&group_id=75348&atid=543653
if ( FCKBrowserInfo.IsIE && this.Document.hasFocus() )
return ;
if ( FCKBrowserInfo.IsSafari )
this.IFrame.focus() ;
else
{
this.Window.focus() ;
}
}
else
{
var oDoc = FCKTools.GetElementDocument( this.Textarea ) ;
if ( (!oDoc.hasFocus || oDoc.hasFocus() ) && oDoc.activeElement == this.Textarea )
return ;
this.Textarea.focus() ;
}
}
catch(e) {}
}
@ -181,10 +244,10 @@ function FCKEditingArea_Cleanup()
this.IFrame = null ;
this.Document = null ;
this.Textarea = null ;
if ( this.Window )
{
this.Window._FCKEditingArea = null ;
this.Window = null ;
}
}
}

View File

@ -0,0 +1,66 @@
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Manages the DOM anscensors element list of a specific DOM node
* (limited to body, inclusive).
*/
// TODO: Implement IE cleanup.
var FCKElementPath = function( lastNode )
{
var eBlock = null ;
var eBlockLimit = null ;
var aElements = new Array() ;
var e = lastNode ;
while ( e )
{
if ( e.nodeType == 1 )
{
if ( !this.LastElement )
this.LastElement = e ;
var sElementName = e.nodeName.toLowerCase() ;
if ( !eBlockLimit )
{
if ( !eBlock && FCKListsLib.PathBlockElements[ sElementName ] != null )
eBlock = e ;
if ( FCKListsLib.PathBlockLimitElements[ sElementName ] != null )
eBlockLimit = e ;
}
aElements.push( e ) ;
if ( sElementName == 'body' )
break ;
}
e = e.parentNode ;
}
this.Block = eBlock ;
this.BlockLimit = eBlockLimit ;
this.Elements = aElements ;
}

View File

@ -0,0 +1,556 @@
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Controls the [Enter] keystroke behavior in a document.
*/
/*
* Constructor.
* @targetDocument : the target document.
* @enterMode : the behavior for the <Enter> keystroke.
* May be "p", "div", "br". Default is "p".
* @shiftEnterMode : the behavior for the <Shift>+<Enter> keystroke.
* May be "p", "div", "br". Defaults to "br".
*/
var FCKEnterKey = function( targetWindow, enterMode, shiftEnterMode )
{
this.Window = targetWindow ;
this.EnterMode = enterMode || 'p' ;
this.ShiftEnterMode = shiftEnterMode || 'br' ;
// Setup the Keystroke Handler.
var oKeystrokeHandler = new FCKKeystrokeHandler( false ) ;
oKeystrokeHandler._EnterKey = this ;
oKeystrokeHandler.OnKeystroke = FCKEnterKey_OnKeystroke ;
oKeystrokeHandler.SetKeystrokes( [
[ 13 , 'Enter' ],
[ SHIFT + 13, 'ShiftEnter' ],
[ 8 , 'Backspace' ],
[ 46 , 'Delete' ]
] ) ;
oKeystrokeHandler.AttachToElement( targetWindow.document ) ;
}
function FCKEnterKey_OnKeystroke( keyCombination, keystrokeValue )
{
var oEnterKey = this._EnterKey ;
try
{
switch ( keystrokeValue )
{
case 'Enter' :
return oEnterKey.DoEnter() ;
break ;
case 'ShiftEnter' :
return oEnterKey.DoShiftEnter() ;
break ;
case 'Backspace' :
return oEnterKey.DoBackspace() ;
break ;
case 'Delete' :
return oEnterKey.DoDelete() ;
}
}
catch (e)
{
// If for any reason we are not able to handle it, go
// ahead with the browser default behavior.
}
return false ;
}
/*
* Executes the <Enter> key behavior.
*/
FCKEnterKey.prototype.DoEnter = function( mode, hasShift )
{
this._HasShift = ( hasShift === true ) ;
var sMode = mode || this.EnterMode ;
if ( sMode == 'br' )
return this._ExecuteEnterBr() ;
else
return this._ExecuteEnterBlock( sMode ) ;
}
/*
* Executes the <Shift>+<Enter> key behavior.
*/
FCKEnterKey.prototype.DoShiftEnter = function()
{
return this.DoEnter( this.ShiftEnterMode, true ) ;
}
/*
* Executes the <Backspace> key behavior.
*/
FCKEnterKey.prototype.DoBackspace = function()
{
var bCustom = false ;
// Get the current selection.
var oRange = new FCKDomRange( this.Window ) ;
oRange.MoveToSelection() ;
if ( !oRange.CheckIsCollapsed() )
return false ;
var oStartBlock = oRange.StartBlock ;
var oEndBlock = oRange.EndBlock ;
// The selection boundaries must be in the same "block limit" element
if ( oRange.StartBlockLimit == oRange.EndBlockLimit && oStartBlock && oEndBlock )
{
if ( !oRange.CheckIsCollapsed() )
{
var bEndOfBlock = oRange.CheckEndOfBlock() ;
oRange.DeleteContents() ;
if ( oStartBlock != oEndBlock )
{
oRange.SetStart(oEndBlock,1) ;
oRange.SetEnd(oEndBlock,1) ;
// if ( bEndOfBlock )
// oEndBlock.parentNode.removeChild( oEndBlock ) ;
}
oRange.Select() ;
bCustom = ( oStartBlock == oEndBlock ) ;
}
if ( oRange.CheckStartOfBlock() )
{
var oCurrentBlock = oRange.StartBlock ;
var ePrevious = FCKDomTools.GetPreviousSourceElement( oCurrentBlock, true, [ 'BODY', oRange.StartBlockLimit.nodeName ], ['UL','OL'] ) ;
bCustom = this._ExecuteBackspace( oRange, ePrevious, oCurrentBlock ) ;
}
else if ( FCKBrowserInfo.IsGecko )
{
// Firefox looses the selection when executing CheckStartOfBlock, so we must reselect.
oRange.Select() ;
}
}
oRange.Release() ;
return bCustom ;
}
FCKEnterKey.prototype._ExecuteBackspace = function( range, previous, currentBlock )
{
var bCustom = false ;
// We could be in a nested LI.
if ( !previous && currentBlock.nodeName.IEquals( 'LI' ) && currentBlock.parentNode.parentNode.nodeName.IEquals( 'LI' ) )
{
this._OutdentWithSelection( currentBlock, range ) ;
return true ;
}
if ( previous && previous.nodeName.IEquals( 'LI' ) )
{
var oNestedList = FCKDomTools.GetLastChild( previous, ['UL','OL'] ) ;
while ( oNestedList )
{
previous = FCKDomTools.GetLastChild( oNestedList, 'LI' ) ;
oNestedList = FCKDomTools.GetLastChild( previous, ['UL','OL'] ) ;
}
}
if ( previous && currentBlock )
{
// If we are in a LI, and the previous block is not an LI, we must outdent it.
if ( currentBlock.nodeName.IEquals( 'LI' ) && !previous.nodeName.IEquals( 'LI' ) )
{
this._OutdentWithSelection( currentBlock, range ) ;
return true ;
}
// Take a reference to the parent for post processing cleanup.
var oCurrentParent = currentBlock.parentNode ;
var sPreviousName = previous.nodeName.toLowerCase() ;
if ( FCKListsLib.EmptyElements[ sPreviousName ] != null || sPreviousName == 'table' )
{
FCKDomTools.RemoveNode( previous ) ;
bCustom = true ;
}
else
{
// Remove the current block.
FCKDomTools.RemoveNode( currentBlock ) ;
// Remove any empty tag left by the block removal.
while ( oCurrentParent.innerHTML.Trim().length == 0 )
{
var oParent = oCurrentParent.parentNode ;
oParent.removeChild( oCurrentParent ) ;
oCurrentParent = oParent ;
}
// Cleanup the previous and the current elements.
FCKDomTools.TrimNode( currentBlock ) ;
FCKDomTools.TrimNode( previous ) ;
// Append a space to the previous.
// Maybe it is not always desirable...
// previous.appendChild( this.Window.document.createTextNode( ' ' ) ) ;
// Set the range to the end of the previous element and bookmark it.
range.SetStart( previous, 2 ) ;
range.Collapse( true ) ;
var oBookmark = range.CreateBookmark() ;
// Move the contents of the block to the previous element and delete it.
FCKDomTools.MoveChildren( currentBlock, previous ) ;
// Place the selection at the bookmark.
range.MoveToBookmark( oBookmark ) ;
range.Select() ;
bCustom = true ;
}
}
return bCustom ;
}
/*
* Executes the <Delete> key behavior.
*/
FCKEnterKey.prototype.DoDelete = function()
{
// The <Delete> has the same effect as the <Backspace>, so we have the same
// results if we just move to the next block and apply the same <Backspace> logic.
var bCustom = false ;
// Get the current selection.
var oRange = new FCKDomRange( this.Window ) ;
oRange.MoveToSelection() ;
// There is just one special case for collapsed selections at the end of a block.
if ( oRange.CheckIsCollapsed() && oRange.CheckEndOfBlock( FCKBrowserInfo.IsGecko ) )
{
var oCurrentBlock = oRange.StartBlock ;
var eNext = FCKDomTools.GetNextSourceElement( oCurrentBlock, true, [ oRange.StartBlockLimit.nodeName ], ['UL','OL'] ) ;
bCustom = this._ExecuteBackspace( oRange, oCurrentBlock, eNext ) ;
}
oRange.Release() ;
return bCustom ;
}
FCKEnterKey.prototype._ExecuteEnterBlock = function( blockTag, range )
{
// Get the current selection.
var oRange = range || new FCKDomRange( this.Window ) ;
// If we don't have a range, move it to the selection.
if ( !range )
oRange.MoveToSelection() ;
// The selection boundaries must be in the same "block limit" element.
if ( oRange.StartBlockLimit == oRange.EndBlockLimit )
{
// If the StartBlock or EndBlock are not available (for text without a
// block tag), we must fix them, by moving the text to a block.
if ( !oRange.StartBlock )
this._FixBlock( oRange, true, blockTag ) ;
if ( !oRange.EndBlock )
this._FixBlock( oRange, false, blockTag ) ;
// Get the current blocks.
var eStartBlock = oRange.StartBlock ;
var eEndBlock = oRange.EndBlock ;
// Delete the current selection.
if ( !oRange.CheckIsEmpty() )
oRange.DeleteContents() ;
// If the selection boundaries are in the same block element
if ( eStartBlock == eEndBlock )
{
var eNewBlock ;
var bIsStartOfBlock = oRange.CheckStartOfBlock() ;
var bIsEndOfBlock = oRange.CheckEndOfBlock() ;
if ( bIsStartOfBlock && !bIsEndOfBlock )
{
eNewBlock = eStartBlock.cloneNode(false) ;
if ( FCKBrowserInfo.IsGeckoLike )
eNewBlock.innerHTML = GECKO_BOGUS ;
// Place the new block before the current block element.
eStartBlock.parentNode.insertBefore( eNewBlock, eStartBlock ) ;
// This is tricky, but to make the new block visible correctly
// we must select it.
if ( FCKBrowserInfo.IsIE )
{
// Move the selection to the new block.
oRange.MoveToNodeContents( eNewBlock ) ;
oRange.Select() ;
}
// Move the selection to the new block.
oRange.MoveToElementEditStart( eStartBlock ) ;
}
else
{
// Check if the selection is at the end of the block.
if ( bIsEndOfBlock )
{
var sStartBlockTag = eStartBlock.tagName.toUpperCase() ;
// If the entire block is selected, and we are in a LI, let's decrease its indentation.
if ( bIsStartOfBlock && sStartBlockTag == 'LI' )
{
this._OutdentWithSelection( eStartBlock, oRange ) ;
oRange.Release() ;
return true ;
}
else
{
// If is a header tag, or we are in a Shift+Enter (#77),
// create a new block element.
if ( (/^H[1-6]$/).test( sStartBlockTag ) || this._HasShift )
eNewBlock = this.Window.document.createElement( blockTag ) ;
// Otherwise, duplicate the current block.
else
{
eNewBlock = eStartBlock.cloneNode(false) ;
this._RecreateEndingTree( eStartBlock, eNewBlock ) ;
}
if ( FCKBrowserInfo.IsGeckoLike )
{
eNewBlock.innerHTML = GECKO_BOGUS ;
// If the entire block is selected, let's add a bogus in the start block.
if ( bIsStartOfBlock )
eStartBlock.innerHTML = GECKO_BOGUS ;
}
}
}
else
{
// Extract the contents of the block from the selection point to the end of its contents.
oRange.SetEnd( eStartBlock, 2 ) ;
var eDocFrag = oRange.ExtractContents() ;
// Duplicate the block element after it.
eNewBlock = eStartBlock.cloneNode(false) ;
// It could be that we are in a LI with a child UL/OL. Insert a bogus to give us space to type.
FCKDomTools.TrimNode( eDocFrag.RootNode ) ;
if ( eDocFrag.RootNode.firstChild.nodeType == 1 && eDocFrag.RootNode.firstChild.tagName.toUpperCase().Equals( 'UL', 'OL' ) )
eNewBlock.innerHTML = GECKO_BOGUS ;
// Place the extracted contents in the duplicated block.
eDocFrag.AppendTo( eNewBlock ) ;
if ( FCKBrowserInfo.IsGecko )
{
// In Gecko, the last child node must be a bogus <br>.
this._AppendBogusBr( eStartBlock ) ;
this._AppendBogusBr( eNewBlock ) ;
}
}
if ( eNewBlock )
{
FCKDomTools.InsertAfterNode( eStartBlock, eNewBlock ) ;
// Move the selection to the new block.
oRange.MoveToElementEditStart( eNewBlock ) ;
if ( FCKBrowserInfo.IsGecko )
eNewBlock.scrollIntoView( false ) ;
}
}
}
else
{
// Move the selection to the end block.
oRange.MoveToElementEditStart( eEndBlock ) ;
}
oRange.Select() ;
}
// Release the resources used by the range.
oRange.Release() ;
return true ;
}
FCKEnterKey.prototype._ExecuteEnterBr = function( blockTag )
{
// Get the current selection.
var oRange = new FCKDomRange( this.Window ) ;
oRange.MoveToSelection() ;
// The selection boundaries must be in the same "block limit" element.
if ( oRange.StartBlockLimit == oRange.EndBlockLimit )
{
oRange.DeleteContents() ;
// Get the new selection (it is collapsed at this point).
oRange.MoveToSelection() ;
var bIsStartOfBlock = oRange.CheckStartOfBlock() ;
var bIsEndOfBlock = oRange.CheckEndOfBlock() ;
var sStartBlockTag = oRange.StartBlock ? oRange.StartBlock.tagName.toUpperCase() : '' ;
var bHasShift = this._HasShift ;
if ( !bHasShift && sStartBlockTag == 'LI' )
return this._ExecuteEnterBlock( null, oRange ) ;
// If we are at the end of a header block.
if ( !bHasShift && bIsEndOfBlock && (/^H[1-6]$/).test( sStartBlockTag ) )
{
FCKDebug.Output( 'BR - Header' ) ;
// Insert a BR after the current paragraph.
FCKDomTools.InsertAfterNode( oRange.StartBlock, this.Window.document.createElement( 'br' ) ) ;
// The space is required by Gecko only to make the cursor blink.
if ( FCKBrowserInfo.IsGecko )
FCKDomTools.InsertAfterNode( oRange.StartBlock, this.Window.document.createTextNode( '' ) ) ;
// IE and Gecko have different behaviors regarding the position.
oRange.SetStart( oRange.StartBlock.nextSibling, FCKBrowserInfo.IsIE ? 3 : 1 ) ;
}
else
{
FCKDebug.Output( 'BR - No Header' ) ;
var eBr = this.Window.document.createElement( 'br' ) ;
oRange.InsertNode( eBr ) ;
// The space is required by Gecko only to make the cursor blink.
if ( FCKBrowserInfo.IsGecko )
FCKDomTools.InsertAfterNode( eBr, this.Window.document.createTextNode( '' ) ) ;
// If we are at the end of a block, we must be sure the bogus node is available in that block.
if ( bIsEndOfBlock && FCKBrowserInfo.IsGecko )
this._AppendBogusBr( eBr.parentNode ) ;
if ( FCKBrowserInfo.IsIE )
oRange.SetStart( eBr, 4 ) ;
else
oRange.SetStart( eBr.nextSibling, 1 ) ;
}
// This collapse guarantees the cursor will be blinking.
oRange.Collapse( true ) ;
oRange.Select() ;
}
// Release the resources used by the range.
oRange.Release() ;
return true ;
}
// Transform a block without a block tag in a valid block (orphan text in the body or td, usually).
FCKEnterKey.prototype._FixBlock = function( range, isStart, blockTag )
{
// Bookmark the range so we can restore it later.
var oBookmark = range.CreateBookmark() ;
// Collapse the range to the requested ending boundary.
range.Collapse( isStart ) ;
// Expands it to the block contents.
range.Expand( 'block_contents' ) ;
// Create the fixed block.
var oFixedBlock = this.Window.document.createElement( blockTag ) ;
// Move the contents of the temporary range to the fixed block.
range.ExtractContents().AppendTo( oFixedBlock ) ;
FCKDomTools.TrimNode( oFixedBlock ) ;
// Insert the fixed block into the DOM.
range.InsertNode( oFixedBlock ) ;
// Move the range back to the bookmarked place.
range.MoveToBookmark( oBookmark ) ;
}
// Appends a bogus <br> at the end of the element, if not yet available.
FCKEnterKey.prototype._AppendBogusBr = function( element )
{
var eLastChild = element.getElementsByTagName('br') ;
if ( eLastChild )
eLastChild = eLastChild[ eLastChild.legth - 1 ] ;
if ( !eLastChild || eLastChild.getAttribute( 'type', 2 ) != '_moz' )
element.appendChild( FCKTools.CreateBogusBR( this.Window.document ) ) ;
}
// Recreate the elements tree at the end of the source block, at the beginning
// of the target block. Eg.:
// If source = <p><u>Some</u> sample <b><i>text</i></b></p> then target = <p><b><i></i></b></p>
// If source = <p><u>Some</u> sample text</p> then target = <p></p>
FCKEnterKey.prototype._RecreateEndingTree = function( source, target )
{
while ( ( source = source.lastChild ) && source.nodeType == 1 && FCKListsLib.InlineChildReqElements[ source.nodeName.toLowerCase() ] != null )
target = target.insertBefore( source.cloneNode( false ), target.firstChild ) ;
}
// Outdents a LI, maintaining the seletion defined on a range.
FCKEnterKey.prototype._OutdentWithSelection = function( li, range )
{
var oBookmark = range.CreateBookmark() ;
FCKListHandler.OutdentListItem( li ) ;
range.MoveToBookmark( oBookmark ) ;
range.Select() ;
}

View File

@ -1,36 +1,38 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: fckevents.js
* FCKEvents Class: used to handle events is a advanced way.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* FCKEvents Class: used to handle events is a advanced way.
*/
var FCKEvents ;
FCKEvents = function( eventsOwner )
var FCKEvents = function( eventsOwner )
{
this.Owner = eventsOwner ;
this.RegisteredEvents = new Object() ;
this._RegisteredEvents = new Object() ;
}
FCKEvents.prototype.AttachEvent = function( eventName, functionPointer )
{
var aTargets ;
if ( !( aTargets = this.RegisteredEvents[ eventName ] ) )
this.RegisteredEvents[ eventName ] = [ functionPointer ] ;
if ( !( aTargets = this._RegisteredEvents[ eventName ] ) )
this._RegisteredEvents[ eventName ] = [ functionPointer ] ;
else
aTargets.push( functionPointer ) ;
}
@ -39,7 +41,7 @@ FCKEvents.prototype.FireEvent = function( eventName, params )
{
var bReturnValue = true ;
var oCalls = this.RegisteredEvents[ eventName ] ;
var oCalls = this._RegisteredEvents[ eventName ] ;
if ( oCalls )
{
@ -48,4 +50,4 @@ FCKEvents.prototype.FireEvent = function( eventName, params )
}
return bReturnValue ;
}
}

View File

@ -1,21 +1,25 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: fckicon.js
* FCKIcon Class: renders an icon from a single image, a strip or even a
* spacer.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* FCKIcon Class: renders an icon from a single image, a strip or even a
* spacer.
*/
var FCKIcon = function( iconPathOrStripInfoArray )
@ -28,15 +32,15 @@ var FCKIcon = function( iconPathOrStripInfoArray )
this.Size = 16 ;
this.Position = iconPathOrStripInfoArray ;
break ;
case 'undefined' :
this.Path = FCK_SPACER_PATH ;
break ;
case 'string' :
this.Path = iconPathOrStripInfoArray ;
break ;
default :
// It is an array in the format [ StripFilePath, IconSize, IconPosition ]
this.Path = iconPathOrStripInfoArray[0] ;
@ -47,26 +51,26 @@ var FCKIcon = function( iconPathOrStripInfoArray )
FCKIcon.prototype.CreateIconElement = function( document )
{
var eIcon ;
var eIcon, eIconImage ;
if ( this.Position ) // It is using an icons strip image.
{
var sPos = '-' + ( ( this.Position - 1 ) * this.Size ) + 'px' ;
if ( FCKBrowserInfo.IsIE )
{
// <div class="TB_Button_Image"><img src="strip.gif" style="top:-16px"></div>
eIcon = document.createElement( 'DIV' ) ;
var eIconImage = eIcon.appendChild( document.createElement( 'IMG' ) ) ;
eIconImage = eIcon.appendChild( document.createElement( 'IMG' ) ) ;
eIconImage.src = this.Path ;
eIconImage.style.top = sPos ;
}
else
{
// <img class="TB_Button_Image" src="spacer.gif" style="background-position: 0px -16px;background-image: url(strip.gif);">
eIcon = document.createElement( 'IMG' ) ;
eIcon.src = FCK_SPACER_PATH ;
eIcon.style.backgroundPosition = '0px ' + sPos ;
@ -83,11 +87,11 @@ FCKIcon.prototype.CreateIconElement = function( document )
// IE makes the button 1px higher if using the <img> directly, so we
// are changing to the <div> system to clip the image correctly.
eIcon = document.createElement( 'DIV' ) ;
var eIconImage = eIcon.appendChild( document.createElement( 'IMG' ) ) ;
eIconImage = eIcon.appendChild( document.createElement( 'IMG' ) ) ;
eIconImage.src = this.Path ? this.Path : FCK_SPACER_PATH ;
}
eIcon.className = 'TB_Button_Image' ;
return eIcon ;

View File

@ -1,51 +1,68 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: fckiecleanup.js
* FCKIECleanup Class: a generic class used as a tool to remove IE leaks.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* FCKIECleanup Class: a generic class used as a tool to remove IE leaks.
*/
var FCKIECleanup = function( attachWindow )
{
// If the attachWindow already have a cleanup object, jusgt use that one.
if ( attachWindow._FCKCleanupObj )
this.Items = attachWindow._FCKCleanupObj.Items ;
else
{
this.Items = new Array() ;
this.Items = new Array() ;
attachWindow._FCKCleanupObj = this ;
attachWindow.attachEvent( 'onunload', FCKIECleanup_Cleanup ) ;
attachWindow._FCKCleanupObj = this ;
FCKTools.AddEventListenerEx( attachWindow, 'unload', FCKIECleanup_Cleanup ) ;
// attachWindow.attachEvent( 'onunload', FCKIECleanup_Cleanup ) ;
}
}
FCKIECleanup.prototype.AddItem = function( dirtyItem, cleanupFunction )
{
this.Items.push( [ dirtyItem, cleanupFunction ] ) ;
}
function FCKIECleanup_Cleanup()
{
var aItems = this._FCKCleanupObj.Items ;
var iLenght = aItems.length ;
if ( !this._FCKCleanupObj )
return ;
for ( var i = 0 ; i < iLenght ; i++ )
var aItems = this._FCKCleanupObj.Items ;
while ( aItems.length > 0 )
{
var oItem = aItems[i] ;
oItem[1].call( oItem[0] ) ;
aItems[i] = null ;
// It is important to remove from the end to the beginning (pop()),
// because of the order things get created in the editor. In the code,
// elements in deeper position in the DOM are placed at the end of the
// cleanup function, so we must cleanup then first, otherwise IE could
// throw some crazy memory errors (IE bug).
var oItem = aItems.pop() ;
if ( oItem )
oItem[1].call( oItem[0] ) ;
}
this._FCKCleanupObj = null ;
if ( CollectGarbage )
CollectGarbage() ;
}

View File

@ -0,0 +1,68 @@
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Preload a list of images, firing an event when complete.
*/
var FCKImagePreloader = function()
{
this._Images = new Array() ;
}
FCKImagePreloader.prototype =
{
AddImages : function( images )
{
if ( typeof( images ) == 'string' )
images = images.split( ';' ) ;
this._Images = this._Images.concat( images ) ;
},
Start : function()
{
var aImages = this._Images ;
this._PreloadCount = aImages.length ;
for ( var i = 0 ; i < aImages.length ; i++ )
{
var eImg = document.createElement( 'img' ) ;
eImg.onload = eImg.onerror = _FCKImagePreloader_OnImage ;
eImg._FCKImagePreloader = this ;
eImg.src = aImages[i] ;
_FCKImagePreloader_ImageCache.push( eImg ) ;
}
}
};
// All preloaded images must be placed in a global array, otherwise the preload
// magic will not happen.
var _FCKImagePreloader_ImageCache = new Array() ;
function _FCKImagePreloader_OnImage()
{
var oImagePreloader = this._FCKImagePreloader ;
if ( (--oImagePreloader._PreloadCount) == 0 && oImagePreloader.OnComplete )
oImagePreloader.OnComplete() ;
this._FCKImagePreloader = null ;
}

View File

@ -0,0 +1,136 @@
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Control keyboard keystroke combinations.
*/
var FCKKeystrokeHandler = function( cancelCtrlDefaults )
{
this.Keystrokes = new Object() ;
this.CancelCtrlDefaults = ( cancelCtrlDefaults !== false ) ;
}
/*
* Listen to keystroke events in an element or DOM document object.
* @target: The element or document to listen to keystroke events.
*/
FCKKeystrokeHandler.prototype.AttachToElement = function( target )
{
// For newer browsers, it is enough to listen to the keydown event only.
// Some browsers instead, don't cancel key events in the keydown, but in the
// keypress. So we must do a longer trip in those cases.
FCKTools.AddEventListenerEx( target, 'keydown', _FCKKeystrokeHandler_OnKeyDown, this ) ;
if ( FCKBrowserInfo.IsGecko10 || FCKBrowserInfo.IsOpera || ( FCKBrowserInfo.IsGecko && FCKBrowserInfo.IsMac ) )
FCKTools.AddEventListenerEx( target, 'keypress', _FCKKeystrokeHandler_OnKeyPress, this ) ;
}
/*
* Sets a list of keystrokes. It can receive either a single array or "n"
* arguments, each one being an array of 1 or 2 elemenst. The first element
* is the keystroke combination, and the second is the value to assign to it.
* If the second element is missing, the keystroke definition is removed.
*/
FCKKeystrokeHandler.prototype.SetKeystrokes = function()
{
// Look through the arguments.
for ( var i = 0 ; i < arguments.length ; i++ )
{
var keyDef = arguments[i] ;
if ( typeof( keyDef[0] ) == 'object' ) // It is an array with arrays defining the keystrokes.
this.SetKeystrokes.apply( this, keyDef ) ;
else
{
if ( keyDef.length == 1 ) // If it has only one element, removed the keystroke.
delete this.Keystrokes[ keyDef[0] ] ;
else // Otherwise add it.
this.Keystrokes[ keyDef[0] ] = keyDef[1] === true ? true : keyDef ;
}
}
}
function _FCKKeystrokeHandler_OnKeyDown( ev, keystrokeHandler )
{
// Get the key code.
var keystroke = ev.keyCode || ev.which ;
// Combine it with the CTRL, SHIFT and ALT states.
var keyModifiers = 0 ;
if ( ev.ctrlKey || ev.metaKey )
keyModifiers += CTRL ;
if ( ev.shiftKey )
keyModifiers += SHIFT ;
if ( ev.altKey )
keyModifiers += ALT ;
var keyCombination = keystroke + keyModifiers ;
var cancelIt = keystrokeHandler._CancelIt = false ;
// Look for its definition availability.
var keystrokeValue = keystrokeHandler.Keystrokes[ keyCombination ] ;
// FCKDebug.Output( 'KeyDown: ' + keyCombination + ' - Value: ' + keystrokeValue ) ;
// If the keystroke is defined
if ( keystrokeValue )
{
// If the keystroke has been explicetly set to "true" OR calling the
// "OnKeystroke" event, it doesn't return "true", the default behavior
// must be preserved.
if ( keystrokeValue === true || !( keystrokeHandler.OnKeystroke && keystrokeHandler.OnKeystroke.apply( keystrokeHandler, keystrokeValue ) ) )
return true ;
cancelIt = true ;
}
// By default, it will cancel all combinations with the CTRL key only (except positioning keys).
if ( cancelIt || ( keystrokeHandler.CancelCtrlDefaults && keyModifiers == CTRL && ( keystroke < 33 || keystroke > 40 ) ) )
{
keystrokeHandler._CancelIt = true ;
if ( ev.preventDefault )
return ev.preventDefault() ;
ev.returnValue = false ;
ev.cancelBubble = true ;
return false ;
}
return true ;
}
function _FCKKeystrokeHandler_OnKeyPress( ev, keystrokeHandler )
{
if ( keystrokeHandler._CancelIt )
{
// FCKDebug.Output( 'KeyPress Cancel', 'Red') ;
if ( ev.preventDefault )
return ev.preventDefault() ;
return false ;
}
return true ;
}

View File

@ -1,23 +1,26 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: fckmenublock.js
* Renders a list of menu items.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Renders a list of menu items.
*/
var FCKMenuBlock = function()
{
this._Items = new Array() ;
@ -32,10 +35,10 @@ FCKMenuBlock.prototype.Count = function()
FCKMenuBlock.prototype.AddItem = function( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled )
{
var oItem = new FCKMenuItem( this, name, label, iconPathOrStripInfoArrayOrIndex, isDisabled ) ;
oItem.OnClick = FCKTools.CreateEventListener( FCKMenuBlock_Item_OnClick, this ) ;
oItem.OnActivate = FCKTools.CreateEventListener( FCKMenuBlock_Item_OnActivate, this ) ;
this._Items.push( oItem ) ;
return oItem ;
@ -49,7 +52,7 @@ FCKMenuBlock.prototype.AddSeparator = function()
FCKMenuBlock.prototype.RemoveAllItems = function()
{
this._Items = new Array() ;
var eItemsTable = this._ItemsTable ;
if ( eItemsTable )
{
@ -74,15 +77,15 @@ FCKMenuBlock.prototype.Create = function( parentElement )
eTable.cellSpacing = 0 ;
FCKTools.DisableSelection( eTable ) ;
var oMainElement = eTable.insertRow(-1).insertCell(-1) ;
oMainElement.className = 'MN_Menu' ;
var eItemsTable = this._ItemsTable = oMainElement.appendChild( oDoc.createElement( 'table' ) ) ;
eItemsTable.cellPadding = 0 ;
eItemsTable.cellSpacing = 0 ;
eItemsTable.cellSpacing = 0 ;
}
for ( var i = 0 ; i < this._Items.length ; i++ )
this._Items[i].Create( this._ItemsTable ) ;
}
@ -97,14 +100,14 @@ function FCKMenuBlock_Item_OnClick( clickedItem, menuBlock )
function FCKMenuBlock_Item_OnActivate( menuBlock )
{
var oActiveItem = menuBlock._ActiveItem ;
if ( oActiveItem && oActiveItem != this )
{
// Set the focus to this menu block window (to fire OnBlur on opened panels).
if ( !FCKBrowserInfo.IsIE && oActiveItem.HasSubMenu && !this.HasSubMenu )
menuBlock._Window.focus() ;
oActiveItem.Deactivate() ;
oActiveItem.Deactivate() ;
}
menuBlock._ActiveItem = this ;
@ -126,7 +129,7 @@ FCKMenuSeparator.prototype.Create = function( parentTable )
var oDoc = FCKTools.GetElementDocument( parentTable ) ;
var r = parentTable.insertRow(-1) ;
var eCell = r.insertCell(-1) ;
eCell.className = 'MN_Separator MN_Icon' ;

View File

@ -1,24 +1,27 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: fckmenublockpanel.js
* This class is a menu block that behaves like a panel. It's a mix of the
* FCKMenuBlock and FCKPanel classes.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* This class is a menu block that behaves like a panel. It's a mix of the
* FCKMenuBlock and FCKPanel classes.
*/
var FCKMenuBlockPanel = function()
{
// Call the "base" constructor.

View File

@ -1,31 +1,34 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: fckmenuitem.js
* Defines and renders a menu items in a menu block.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Defines and renders a menu items in a menu block.
*/
var FCKMenuItem = function( parentMenuBlock, name, label, iconPathOrStripInfoArray, isDisabled )
{
this.Name = name ;
this.Label = label || name ;
this.IsDisabled = isDisabled ;
this.Icon = new FCKIcon( iconPathOrStripInfoArray ) ;
this.SubMenu = new FCKMenuBlockPanel() ;
this.SubMenu.Parent = parentMenuBlock ;
this.SubMenu.OnClick = FCKTools.CreateEventListener( FCKMenuItem_SubMenu_OnClick, this ) ;
@ -49,7 +52,7 @@ FCKMenuItem.prototype.AddSeparator = function()
FCKMenuItem.prototype.Create = function( parentTable )
{
var bHasSubMenu = this.HasSubMenu ;
var oDoc = FCKTools.GetElementDocument( parentTable ) ;
// Add a row in the table to hold the menu item.
@ -65,7 +68,7 @@ FCKMenuItem.prototype.Create = function( parentTable )
if ( !bHasSubMenu )
FCKTools.AddEventListenerEx( r, 'mouseout', FCKMenuItem_OnMouseOut, [ this ] ) ;
}
// Create the icon cell.
var eCell = r.insertCell(-1) ;
eCell.className = 'MN_Icon' ;
@ -76,7 +79,7 @@ FCKMenuItem.prototype.Create = function( parentTable )
eCell.className = 'MN_Label' ;
eCell.noWrap = true ;
eCell.appendChild( oDoc.createTextNode( this.Label ) ) ;
// Create the arrow cell and setup the sub menu panel (if needed).
eCell = r.insertCell(-1) ;
if ( bHasSubMenu )
@ -88,7 +91,7 @@ FCKMenuItem.prototype.Create = function( parentTable )
eArrowImg.src = FCK_IMAGES_PATH + 'arrow_' + FCKLang.Dir + '.gif' ;
eArrowImg.width = 4 ;
eArrowImg.height = 7 ;
this.SubMenu.Create() ;
this.SubMenu.Panel.OnHide = FCKTools.CreateEventListener( FCKMenuItem_SubMenu_OnHide, this ) ;
}

View File

@ -1,43 +1,48 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: fckpanel.js
* Component that creates floating panels. It is used by many
* other components, like the toolbar items, context menu, etc...
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Component that creates floating panels. It is used by many
* other components, like the toolbar items, context menu, etc...
*/
var FCKPanel = function( parentWindow )
{
this.IsRTL = ( FCKLang.Dir == 'rtl' ) ;
this.IsContextMenu = false ;
this._LockCounter = 0 ;
this._Window = parentWindow || window ;
var oDocument ;
if ( FCKBrowserInfo.IsIE )
{
// Create the Popup that will hold the panel.
this._Popup = this._Window.createPopup() ;
oDocument = this.Document = this._Popup.document ;
FCK.IECleanup.AddItem( this, FCKPanel_Cleanup ) ;
}
else
{
var oIFrame = this._IFrame = this._Window.document.createElement('iframe') ;
var oIFrame = this._IFrame = this._Window.document.createElement('iframe') ;
oIFrame.src = 'javascript:void(0)' ;
oIFrame.allowTransparency = true ;
oIFrame.frameBorder = '0' ;
@ -50,9 +55,9 @@ var FCKPanel = function( parentWindow )
window.frameElement.parentNode.insertBefore( oIFrame, window.frameElement ) ;
else
this._Window.document.body.appendChild( oIFrame ) ;
var oIFrameWindow = oIFrame.contentWindow ;
var oIFrameWindow = oIFrame.contentWindow ;
oDocument = this.Document = oIFrameWindow.document ;
// Initialize the IFRAME document body.
@ -65,7 +70,7 @@ var FCKPanel = function( parentWindow )
}
oDocument.dir = FCKLang.Dir ;
oDocument.oncontextmenu = FCKTools.CancelEvent ;
@ -74,9 +79,6 @@ var FCKPanel = function( parentWindow )
// The "float" property must be set so Firefox calculates the size correcly.
this.MainNode.style.cssFloat = this.IsRTL ? 'right' : 'left' ;
if ( FCK.IECleanup )
FCK.IECleanup.AddItem( this, FCKPanel_Cleanup ) ;
}
@ -87,7 +89,7 @@ FCKPanel.prototype.AppendStyleSheet = function( styleSheet )
FCKPanel.prototype.Preload = function( x, y, relElement )
{
// The offsetWidth and offsetHeight properties are not available if the
// The offsetWidth and offsetHeight properties are not available if the
// element is not visible. So we must "show" the popup with no size to
// be able to use that values in the second call (IE only).
if ( this._Popup )
@ -96,19 +98,21 @@ FCKPanel.prototype.Preload = function( x, y, relElement )
FCKPanel.prototype.Show = function( x, y, relElement, width, height )
{
var iMainWidth ;
if ( this._Popup )
{
// The offsetWidth and offsetHeight properties are not available if the
// The offsetWidth and offsetHeight properties are not available if the
// element is not visible. So we must "show" the popup with no size to
// be able to use that values in the second call.
this._Popup.show( x, y, 0, 0, relElement ) ;
// The following lines must be place after the above "show", otherwise it
// The following lines must be place after the above "show", otherwise it
// doesn't has the desired effect.
this.MainNode.style.width = width ? width + 'px' : '' ;
this.MainNode.style.height = height ? height + 'px' : '' ;
var iMainWidth = this.MainNode.offsetWidth ;
iMainWidth = this.MainNode.offsetWidth ;
if ( this.IsRTL )
{
@ -117,10 +121,10 @@ FCKPanel.prototype.Show = function( x, y, relElement, width, height )
else if ( relElement )
x = ( x * -1 ) + relElement.offsetWidth - iMainWidth ;
}
// Second call: Show the Popup at the specified location, with the correct size.
this._Popup.show( x, y, iMainWidth, this.MainNode.offsetHeight, relElement ) ;
if ( this.OnHide )
{
if ( this._Timer )
@ -141,7 +145,7 @@ FCKPanel.prototype.Show = function( x, y, relElement, width, height )
this.MainNode.style.width = width ? width + 'px' : '' ;
this.MainNode.style.height = height ? height + 'px' : '' ;
var iMainWidth = this.MainNode.offsetWidth ;
iMainWidth = this.MainNode.offsetWidth ;
if ( !width ) this._IFrame.width = 1 ;
if ( !height ) this._IFrame.height = 1 ;
@ -152,7 +156,11 @@ FCKPanel.prototype.Show = function( x, y, relElement, width, height )
// work when the editor is in RTL.
iMainWidth = this.MainNode.offsetWidth ;
var oPos = FCKTools.GetElementPosition( ( relElement.nodeType == 9 ? relElement.body : relElement), this._Window ) ;
var oPos = FCKTools.GetElementPosition(
relElement.nodeType == 9 ?
( FCKTools.IsStrictMode( relElement ) ? relElement.documentElement : relElement.body ) :
relElement,
this._Window ) ;
if ( this.IsRTL && !this.IsContextMenu )
x = ( x * -1 ) ;
@ -171,7 +179,7 @@ FCKPanel.prototype.Show = function( x, y, relElement, width, height )
{
var oViewPaneSize = FCKTools.GetViewPaneSize( this._Window ) ;
var oScrollPosition = FCKTools.GetScrollPosition( this._Window ) ;
var iViewPaneHeight = oViewPaneSize.Height + oScrollPosition.Y ;
var iViewPaneWidth = oViewPaneSize.Width + oScrollPosition.X ;
@ -181,17 +189,17 @@ FCKPanel.prototype.Show = function( x, y, relElement, width, height )
if ( ( y + this.MainNode.offsetHeight ) > iViewPaneHeight )
y -= y + this.MainNode.offsetHeight - iViewPaneHeight ;
}
if ( x < 0 )
x = 0 ;
// Set the context menu DIV in the specified location.
this._IFrame.style.left = x + 'px' ;
this._IFrame.style.top = y + 'px' ;
var iWidth = iMainWidth ;
var iHeight = this.MainNode.offsetHeight ;
this._IFrame.width = iWidth ;
this._IFrame.height = iHeight ;
@ -212,17 +220,17 @@ FCKPanel.prototype.Hide = function( ignoreOnHide )
{
if ( !this._IsOpened )
return ;
// Enable the editor to fire the "OnBlur".
if ( typeof( FCKFocusManager ) != 'undefined' )
FCKFocusManager.Unlock() ;
// It is better to set the sizes to 0, otherwise Firefox would have
// It is better to set the sizes to 0, otherwise Firefox would have
// rendering problems.
this._IFrame.width = this._IFrame.height = 0 ;
this._IsOpened = false ;
if ( this.ParentPanel )
this.ParentPanel.Unlock() ;
@ -241,11 +249,11 @@ FCKPanel.prototype.CheckIsOpened = function()
FCKPanel.prototype.CreateChildPanel = function()
{
var oWindow = this._Popup ? FCKTools.GetParentWindow( this.Document ) : this._Window ;
var oWindow = this._Popup ? FCKTools.GetDocumentWindow( this.Document ) : this._Window ;
var oChildPanel = new FCKPanel( oWindow, true ) ;
oChildPanel.ParentPanel = this ;
return oChildPanel ;
}
@ -270,7 +278,7 @@ function FCKPanel_Window_OnFocus( e, panel )
function FCKPanel_Window_OnBlur( e, panel )
{
panel.HasFocus = false ;
if ( panel._LockCounter == 0 )
FCKTools.RunFunction( panel.Hide, panel ) ;
}
@ -281,7 +289,7 @@ function CheckPopupOnHide( forceHide )
{
window.clearInterval( this._Timer ) ;
this._Timer = null ;
FCKTools.RunFunction( this.OnHide, this ) ;
}
}

View File

@ -1,20 +1,24 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: fckplugin.js
* FCKPlugin Class: Represents a single plugin.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* FCKPlugin Class: Represents a single plugin.
*/
var FCKPlugin = function( name, availableLangs, basePath )
@ -22,7 +26,7 @@ var FCKPlugin = function( name, availableLangs, basePath )
this.Name = name ;
this.BasePath = basePath ? basePath : FCKConfig.PluginsPath ;
this.Path = this.BasePath + name + '/' ;
if ( !availableLangs || availableLangs.length == 0 )
this.AvailableLangs = new Array() ;
else
@ -35,18 +39,18 @@ FCKPlugin.prototype.Load = function()
if ( this.AvailableLangs.length > 0 )
{
var sLang ;
// Check if the plugin has the language file for the active language.
if ( this.AvailableLangs.indexOf( FCKLanguageManager.ActiveLanguage.Code ) >= 0 )
if ( this.AvailableLangs.IndexOf( FCKLanguageManager.ActiveLanguage.Code ) >= 0 )
sLang = FCKLanguageManager.ActiveLanguage.Code ;
else
// Load the default language file (first one) if the current one is not available.
sLang = this.AvailableLangs[0] ;
// Add the main plugin script.
LoadScript( this.Path + 'lang/' + sLang + '.js' ) ;
LoadScript( this.Path + 'lang/' + sLang + '.js' ) ;
}
// Add the main plugin script.
LoadScript( this.Path + 'fckplugin.js' ) ;
}

View File

@ -1,20 +1,24 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: fckspecialcombo.js
* FCKSpecialCombo Class: represents a special combo.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* FCKSpecialCombo Class: represents a special combo.
*/
var FCKSpecialCombo = function( caption, fieldWidth, panelWidth, panelMaxHeight, parentWindow )
@ -29,9 +33,9 @@ var FCKSpecialCombo = function( caption, fieldWidth, panelWidth, panelMaxHeight,
this.Style = FCK_TOOLBARITEM_ICONTEXT ;
this.Enabled = true ;
this.Items = new Object() ;
this._Panel = new FCKPanel( parentWindow || window, true ) ;
this._Panel.AppendStyleSheet( FCKConfig.SkinPath + 'fck_editor.css' ) ;
this._PanelBox = this._Panel.MainNode.appendChild( this._Panel.Document.createElement( 'DIV' ) ) ;
@ -39,7 +43,7 @@ var FCKSpecialCombo = function( caption, fieldWidth, panelWidth, panelMaxHeight,
this._PanelBox.style.width = this.PanelWidth + 'px' ;
this._PanelBox.innerHTML = '<table cellpadding="0" cellspacing="0" width="100%" style="TABLE-LAYOUT: fixed"><tr><td nowrap></td></tr></table>' ;
this._ItemsHolderEl = this._PanelBox.getElementsByTagName('TD')[0] ;
if ( FCK.IECleanup )
@ -88,23 +92,23 @@ FCKSpecialCombo.prototype.AddItem = function( id, html, label, bgColor )
// In IE, the width must be set so the borders are shown correctly when the content overflows.
if ( FCKBrowserInfo.IsIE )
oDiv.style.width = '100%' ;
if ( bgColor )
oDiv.style.backgroundColor = bgColor ;
oDiv.onmouseover = FCKSpecialCombo_ItemOnMouseOver ;
oDiv.onmouseout = FCKSpecialCombo_ItemOnMouseOut ;
oDiv.onclick = FCKSpecialCombo_ItemOnClick ;
this.Items[ id.toString().toLowerCase() ] = oDiv ;
return oDiv ;
}
FCKSpecialCombo.prototype.SelectItem = function( itemId )
{
itemId = itemId ? itemId.toString().toLowerCase() : '' ;
var oDiv = this.Items[ itemId ] ;
if ( oDiv )
{
@ -123,7 +127,7 @@ FCKSpecialCombo.prototype.SelectItemByLabel = function( itemLabel, setLabel )
{
oDiv.className = oDiv.originalClass = 'SC_ItemSelected' ;
oDiv.Selected = true ;
if ( setLabel )
this.SetLabel( itemLabel ) ;
}
@ -137,7 +141,7 @@ FCKSpecialCombo.prototype.DeselectAll = function( clearLabel )
this.Items[i].className = this.Items[i].originalClass = 'SC_Item' ;
this.Items[i].Selected = false ;
}
if ( clearLabel )
this.SetLabel( '' ) ;
}
@ -145,7 +149,7 @@ FCKSpecialCombo.prototype.DeselectAll = function( clearLabel )
FCKSpecialCombo.prototype.SetLabelById = function( id )
{
id = id ? id.toString().toLowerCase() : '' ;
var oDiv = this.Items[ id ] ;
this.SetLabel( oDiv ? oDiv.FCKItemLabel : '' ) ;
}
@ -155,13 +159,21 @@ FCKSpecialCombo.prototype.SetLabel = function( text )
this.Label = text.length == 0 ? '&nbsp;' : text ;
if ( this._LabelEl )
{
this._LabelEl.innerHTML = this.Label ;
// It may happen that the label is some HTML, including tags. This
// would be a problem because when the user click on those tags, the
// combo will get the selection from the editing area. So we must
// disable any kind of selection here.
FCKTools.DisableSelection( this._LabelEl ) ;
}
}
FCKSpecialCombo.prototype.SetEnabled = function( isEnabled )
{
this.Enabled = isEnabled ;
this._OuterTable.className = isEnabled ? '' : 'SC_FieldDisabled' ;
}
@ -171,12 +183,12 @@ FCKSpecialCombo.prototype.Create = function( targetElement )
var eOuterTable = this._OuterTable = targetElement.appendChild( oDoc.createElement( 'TABLE' ) ) ;
eOuterTable.cellPadding = 0 ;
eOuterTable.cellSpacing = 0 ;
eOuterTable.insertRow(-1) ;
var sClass ;
var bShowLabel ;
switch ( this.Style )
{
case FCK_TOOLBARITEM_ONLYICON :
@ -198,7 +210,7 @@ FCKSpecialCombo.prototype.Create = function( targetElement )
oCaptionCell.innerHTML = this.Caption ;
oCaptionCell.className = 'SC_FieldCaption' ;
}
// Create the main DIV element.
var oField = FCKTools.AppendElement( eOuterTable.rows[0].insertCell(-1), 'div' ) ;
if ( bShowLabel )
@ -215,7 +227,7 @@ FCKSpecialCombo.prototype.Create = function( targetElement )
oField.className = 'TB_Button_Off' ;
//oField.innerHTML = '<span className="SC_FieldCaption">' + this.Caption + '<table cellpadding="0" cellspacing="0" style="TABLE-LAYOUT: fixed;"><tbody><tr><td class="SC_FieldButton" style="border-left: none;">&nbsp;</td></tr></tbody></table>' ;
//oField.innerHTML = '<table cellpadding="0" cellspacing="0" style="TABLE-LAYOUT: fixed;"><tbody><tr><td class="SC_FieldButton" style="border-left: none;">&nbsp;</td></tr></tbody></table>' ;
// Gets the correct CSS class to use for the specified style (param).
oField.innerHTML = '<table title="' + this.Tooltip + '" class="' + sClass + '" cellspacing="0" cellpadding="0" border="0">' +
'<tr>' +
@ -233,11 +245,11 @@ FCKSpecialCombo.prototype.Create = function( targetElement )
// Events Handlers
oField.SpecialCombo = this ;
oField.onmouseover = FCKSpecialCombo_OnMouseOver ;
oField.onmouseout = FCKSpecialCombo_OnMouseOut ;
oField.onclick = FCKSpecialCombo_OnClick ;
FCKTools.DisableSelection( this._Panel.Document.body ) ;
}
@ -247,13 +259,13 @@ function FCKSpecialCombo_Cleanup()
this._OuterTable = null ;
this._ItemsHolderEl = null ;
this._PanelBox = null ;
if ( this.Items )
{
for ( var key in this.Items )
this.Items[key] = null ;
}
}
}
function FCKSpecialCombo_OnMouseOver()
{
@ -273,7 +285,7 @@ function FCKSpecialCombo_OnMouseOver()
}
}
}
function FCKSpecialCombo_OnMouseOut()
{
switch ( this.SpecialCombo.Style )
@ -289,17 +301,17 @@ function FCKSpecialCombo_OnMouseOut()
break ;
}
}
function FCKSpecialCombo_OnClick( e )
{
// For Mozilla we must stop the event propagation to avoid it hiding
// For Mozilla we must stop the event propagation to avoid it hiding
// the panel because of a click outside of it.
// if ( e )
// {
// e.stopPropagation() ;
// FCKPanelEventHandlers.OnDocumentClick( e ) ;
// }
var oSpecialCombo = this.SpecialCombo ;
if ( oSpecialCombo.Enabled )
@ -308,7 +320,7 @@ function FCKSpecialCombo_OnClick( e )
var oPanelBox = oSpecialCombo._PanelBox ;
var oItemsHolder = oSpecialCombo._ItemsHolderEl ;
var iMaxHeight = oSpecialCombo.PanelMaxHeight ;
if ( oSpecialCombo.OnBeforeClick )
oSpecialCombo.OnBeforeClick( oSpecialCombo ) ;
@ -326,7 +338,7 @@ function FCKSpecialCombo_OnClick( e )
// }
else
oPanelBox.style.height = '' ;
// oPanel.PanelDiv.style.width = oSpecialCombo.PanelWidth + 'px' ;
oPanel.Show( 0, this.offsetHeight, this ) ;
@ -335,7 +347,7 @@ function FCKSpecialCombo_OnClick( e )
// return false ;
}
/*
/*
Sample Combo Field HTML output:
<div class="SC_Field" style="width: 80px;">

View File

@ -1,20 +1,24 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: fckstyledef.js
* FCKStyleDef Class: represents a single style definition.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* FCKStyleDef Class: represents a single style definition.
*/
var FCKStyleDef = function( name, element )
@ -33,10 +37,10 @@ FCKStyleDef.prototype.AddAttribute = function( name, value )
FCKStyleDef.prototype.GetOpenerTag = function()
{
var s = '<' + this.Element ;
for ( var a in this.Attributes )
s += ' ' + a + '="' + this.Attributes[a] + '"' ;
return s + '>' ;
}

View File

@ -1,20 +1,24 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: fckstyledef_gecko.js
* FCKStyleDef Class: represents a single stylke definition. (Gecko specific)
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* FCKStyleDef Class: represents a single stylke definition. (Gecko specific)
*/
FCKStyleDef.prototype.ApplyToSelection = function()
@ -22,22 +26,22 @@ FCKStyleDef.prototype.ApplyToSelection = function()
if ( FCKSelection.GetType() == 'Text' && !this.IsObjectElement )
{
var oSelection = FCK.ToolbarSet.CurrentInstance.EditorWindow.getSelection() ;
// Create the main element.
var e = FCK.ToolbarSet.CurrentInstance.EditorDocument.createElement( this.Element ) ;
for ( var i = 0 ; i < oSelection.rangeCount ; i++ )
{
e.appendChild( oSelection.getRangeAt(i).extractContents() ) ;
}
// Set the attributes.
this._AddAttributes( e ) ;
// Remove the duplicated elements.
this._RemoveDuplicates( e ) ;
var oRange = oSelection.getRangeAt(0) ;
var oRange = oSelection.getRangeAt(0) ;
oRange.insertNode( e ) ;
}
else
@ -56,7 +60,6 @@ FCKStyleDef.prototype._AddAttributes = function( targetElement )
{
case 'src' :
targetElement.setAttribute( '_fcksavedurl', this.Attributes[a], 0 ) ;
default :
targetElement.setAttribute( a, this.Attributes[a], 0 ) ;
}
@ -68,12 +71,12 @@ FCKStyleDef.prototype._RemoveDuplicates = function( parent )
for ( var i = 0 ; i < parent.childNodes.length ; i++ )
{
var oChild = parent.childNodes[i] ;
if ( oChild.nodeType != 1 )
continue ;
this._RemoveDuplicates( oChild ) ;
if ( this.IsEqual( oChild ) )
FCKTools.RemoveOuterTags( oChild ) ;
}
@ -83,13 +86,13 @@ FCKStyleDef.prototype.IsEqual = function( e )
{
if ( e.tagName != this.Element )
return false ;
for ( var a in this.Attributes )
{
if ( e.getAttribute( a ) != this.Attributes[a] )
return false ;
}
return true ;
}
@ -111,6 +114,6 @@ FCKStyleDef.prototype._RemoveMe = function( elementToCheck )
else
FCKTools.RemoveOuterTags( elementToCheck ) ;
}
this._RemoveMe( oParent ) ;
}

View File

@ -1,40 +1,44 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: fckstyledef_ie.js
* FCKStyleDef Class: represents a single stylke definition. (IE specific)
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* FCKStyleDef Class: represents a single stylke definition. (IE specific)
*/
FCKStyleDef.prototype.ApplyToSelection = function()
{
var oSelection = FCK.ToolbarSet.CurrentInstance.EditorDocument.selection ;
if ( oSelection.type == 'Text' )
{
var oRange = oSelection.createRange() ;
// Create the main element.
var e = document.createElement( this.Element ) ;
e.innerHTML = oRange.htmlText ;
// Set the attributes.
this._AddAttributes( e ) ;
// Remove the duplicated elements.
this._RemoveDuplicates( e ) ;
// Replace the selection with the resulting HTML.
oRange.pasteHTML( e.outerHTML ) ;
}
@ -62,7 +66,6 @@ FCKStyleDef.prototype._AddAttributes = function( targetElement )
case 'src' :
targetElement.setAttribute( '_fcksavedurl', this.Attributes[a], 0 ) ;
default :
targetElement.setAttribute( a, this.Attributes[a], 0 ) ;
}
@ -75,7 +78,7 @@ FCKStyleDef.prototype._RemoveDuplicates = function( parent )
{
var oChild = parent.children[i] ;
this._RemoveDuplicates( oChild ) ;
if ( this.IsEqual( oChild ) )
FCKTools.RemoveOuterTags( oChild ) ;
}
@ -85,7 +88,7 @@ FCKStyleDef.prototype.IsEqual = function( e )
{
if ( e.tagName != this.Element )
return false ;
for ( var a in this.Attributes )
{
switch ( a.toLowerCase() )
@ -103,7 +106,7 @@ FCKStyleDef.prototype.IsEqual = function( e )
return false ;
}
}
return true ;
}
@ -134,6 +137,6 @@ FCKStyleDef.prototype._RemoveMe = function( elementToCheck )
else
FCKTools.RemoveOuterTags( elementToCheck ) ;
}
this._RemoveMe( oParent ) ;
}

View File

@ -1,21 +1,25 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: fckstylesloader.js
* FCKStylesLoader Class: this class define objects that are responsible
* for loading the styles defined in the XML file.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* FCKStylesLoader Class: this class define objects that are responsible
* for loading the styles defined in the XML file.
*/
var FCKStylesLoader = function()
@ -31,24 +35,24 @@ FCKStylesLoader.prototype.Load = function( stylesXmlUrl )
// Load the XML file into a FCKXml object.
var oXml = new FCKXml() ;
oXml.LoadUrl( stylesXmlUrl ) ;
// Get the "Style" nodes defined in the XML file.
var aStyleNodes = oXml.SelectNodes( 'Styles/Style' ) ;
// Add each style to our "Styles" collection.
for ( var i = 0 ; i < aStyleNodes.length ; i++ )
{
var sElement = aStyleNodes[i].attributes.getNamedItem('element').value.toUpperCase() ;
// Create the style definition object.
var oStyleDef = new FCKStyleDef( aStyleNodes[i].attributes.getNamedItem('name').value, sElement ) ;
if ( oStyleDef.IsObjectElement )
this.HasObjectElements = true ;
// Get the attributes defined for the style (if any).
var aAttNodes = oXml.SelectNodes( 'Attribute', aStyleNodes[i] ) ;
// Add the attributes to the style definition object.
for ( var j = 0 ; j < aAttNodes.length ; j++ )
{
@ -63,13 +67,13 @@ FCKStylesLoader.prototype.Load = function( stylesXmlUrl )
oTempE.style.cssText = sAttValue ;
sAttValue = oTempE.style.cssText ;
}
oStyleDef.AddAttribute( sAttName, sAttValue ) ;
}
// Add the style to the "Styles" collection using it's name as the key.
this.Styles[ oStyleDef.Name ] = oStyleDef ;
// Add the style to the "StyleGroups" collection.
var aGroup = this.StyleGroups[sElement] ;
if ( aGroup == null )
@ -79,6 +83,6 @@ FCKStylesLoader.prototype.Load = function( stylesXmlUrl )
}
aGroup[aGroup.length] = oStyleDef ;
}
this.Loaded = true ;
}

View File

@ -1,21 +1,25 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: fcktoolbar.js
* FCKToolbar Class: represents a toolbar in the toolbarset. It is a group of
* toolbar items.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* FCKToolbar Class: represents a toolbar in the toolbarset. It is a group of
* toolbar items.
*/
var FCKToolbar = function()
@ -39,14 +43,14 @@ FCKToolbar.prototype.AddButton = function( name, label, tooltip, iconPathOrStrip
var oButton = new FCKToolbarButtonUI( name, label, tooltip, iconPathOrStripInfoArrayOrIndex, style, state ) ;
oButton._FCKToolbar = this ;
oButton.OnClick = FCKToolbar_OnItemClick ;
return this.AddItem( oButton ) ;
}
function FCKToolbar_OnItemClick( item )
{
var oToolbar = item._FCKToolbar ;
if ( oToolbar.OnItemClick )
oToolbar.OnItemClick( oToolbar, item ) ;
}
@ -74,23 +78,23 @@ FCKToolbar.prototype.Create = function( parentElement )
e.dir = FCKLang.Dir ;
e.cellPadding = 0 ;
e.cellSpacing = 0 ;
this.RowElement = e.insertRow(-1) ;
// Insert the start cell.
var eCell ;
if ( !this.HideStart )
{
eCell = this.RowElement.insertCell(-1) ;
eCell.appendChild( oDoc.createElement( 'div' ) ).className = 'TB_Start' ;
}
for ( var i = 0 ; i < this.Items.length ; i++ )
{
this.Items[i].Create( this.RowElement.insertCell(-1) ) ;
}
// Insert the ending cell.
if ( !this.HideEnd )
{

View File

@ -1,22 +1,26 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: fcktoolbarbreak_gecko.js
* FCKToolbarBreak Class: breaks the toolbars.
* It makes it possible to force the toolbar to break to a new line.
* This is the Gecko specific implementation.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* FCKToolbarBreak Class: breaks the toolbars.
* It makes it possible to force the toolbar to break to a new line.
* This is the Gecko specific implementation.
*/
var FCKToolbarBreak = function()
@ -25,8 +29,8 @@ var FCKToolbarBreak = function()
FCKToolbarBreak.prototype.Create = function( targetElement )
{
var oBreakDiv = targetElement.ownerDocument.createElement( 'div' ) ;
oBreakDiv.style.clear = oBreakDiv.style.cssFloat = FCKLang.Dir == 'rtl' ? 'right' : 'left' ;
targetElement.appendChild( oBreakDiv ) ;
}

View File

@ -1,22 +1,26 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: fcktoolbarbreak_ie.js
* FCKToolbarBreak Class: breaks the toolbars.
* It makes it possible to force the toolbar to brak to a new line.
* This is the IE specific implementation.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* FCKToolbarBreak Class: breaks the toolbars.
* It makes it possible to force the toolbar to brak to a new line.
* This is the IE specific implementation.
*/
var FCKToolbarBreak = function()
@ -25,10 +29,10 @@ var FCKToolbarBreak = function()
FCKToolbarBreak.prototype.Create = function( targetElement )
{
var oBreakDiv = FCKTools.GetElementDocument( targetElement ).createElement( 'div' ) ;
oBreakDiv.className = 'TB_Break' ;
oBreakDiv.style.clear = FCKLang.Dir == 'rtl' ? 'left' : 'right' ;
targetElement.appendChild( oBreakDiv ) ;
}

View File

@ -1,20 +1,24 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: fcktoolbarbutton.js
* FCKToolbarButton Class: represents a button in the toolbar.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* FCKToolbarButton Class: represents a button in the toolbar.
*/
var FCKToolbarButton = function( commandName, label, tooltip, style, sourceView, contextSensitive, icon )
@ -24,7 +28,7 @@ var FCKToolbarButton = function( commandName, label, tooltip, style, sourceView,
this.Tooltip = tooltip ;
this.Style = style ;
this.SourceView = sourceView ? true : false ;
this.ContextSensitive = contextSensitive ? true : false ;
this.ContextSensitive = contextSensitive ? true : false ;
if ( icon == null )
this.IconPath = FCKConfig.SkinPath + 'toolbar/' + commandName.toLowerCase() + '.gif' ;
@ -36,7 +40,7 @@ FCKToolbarButton.prototype.Create = function( targetElement )
{
this._UIButton = new FCKToolbarButtonUI( this.CommandName, this.Label, this.Tooltip, this.IconPath, this.Style ) ;
this._UIButton.OnClick = this.Click ;
this._UIButton._ToolbarButton = this ;
this._UIButton._ToolbarButton = this ;
this._UIButton.Create( targetElement ) ;
}
@ -44,10 +48,10 @@ FCKToolbarButton.prototype.RefreshState = function()
{
// Gets the actual state.
var eState = FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( this.CommandName ).GetState() ;
// If there are no state changes than do nothing and return.
if ( eState == this._UIButton.State ) return ;
// Sets the actual state.
this._UIButton.ChangeState( eState ) ;
}

Some files were not shown because too many files have changed in this diff Show More