first commit
This commit is contained in:
@ -0,0 +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: fckplugin.js
|
||||
* This is the sample plugin definition file.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
// Register the related commands.
|
||||
FCKCommands.RegisterCommand( 'My_Find' , new FCKDialogCommand( FCKLang['DlgMyFindTitle'] , FCKLang['DlgMyFindTitle'] , FCKConfig.PluginsPath + 'findreplace/find.html' , 340, 170 ) ) ;
|
||||
FCKCommands.RegisterCommand( 'My_Replace' , new FCKDialogCommand( FCKLang['DlgMyReplaceTitle'], FCKLang['DlgMyReplaceTitle'] , FCKConfig.PluginsPath + 'findreplace/replace.html', 340, 200 ) ) ;
|
||||
|
||||
// Create the "Find" toolbar button.
|
||||
var oFindItem = new FCKToolbarButton( 'My_Find', FCKLang['DlgMyFindTitle'] ) ;
|
||||
oFindItem.IconPath = FCKConfig.PluginsPath + 'findreplace/find.gif' ;
|
||||
|
||||
FCKToolbarItems.RegisterItem( 'My_Find', oFindItem ) ; // 'My_Find' is the name used in the Toolbar config.
|
||||
|
||||
// Create the "Replace" toolbar button.
|
||||
var oReplaceItem = new FCKToolbarButton( 'My_Replace', FCKLang['DlgMyReplaceTitle'] ) ;
|
||||
oReplaceItem.IconPath = FCKConfig.PluginsPath + 'findreplace/replace.gif' ;
|
||||
|
||||
FCKToolbarItems.RegisterItem( 'My_Replace', oReplaceItem ) ; // 'My_Replace' is the name used in the Toolbar config.
|
BIN
standort/FCKeditor/_samples/_plugins/findreplace/find.gif
Normal file
BIN
standort/FCKeditor/_samples/_plugins/findreplace/find.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 595 B |
168
standort/FCKeditor/_samples/_plugins/findreplace/find.html
Normal file
168
standort/FCKeditor/_samples/_plugins/findreplace/find.html
Normal file
@ -0,0 +1,168 @@
|
||||
<!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)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta content="noindex, nofollow" name="robots">
|
||||
<script type="text/javascript">
|
||||
|
||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||
|
||||
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 ) ;
|
||||
|
||||
window.parent.SetAutoSize( true ) ;
|
||||
}
|
||||
|
||||
function btnStat(frm)
|
||||
{
|
||||
document.getElementById('btnFind').disabled =
|
||||
( document.getElementById('txtFind').value.length == 0 ) ;
|
||||
}
|
||||
|
||||
function ReplaceTextNodes( parentNode, regex, replaceValue, replaceAll )
|
||||
{
|
||||
for ( var i = 0 ; i < parentNode.childNodes.length ; i++ )
|
||||
{
|
||||
var oNode = parentNode.childNodes[i] ;
|
||||
if ( oNode.nodeType == 3 )
|
||||
{
|
||||
var sReplaced = oNode.nodeValue.replace( regex, replaceValue ) ;
|
||||
if ( oNode.nodeValue != sReplaced )
|
||||
{
|
||||
oNode.nodeValue = sReplaced ;
|
||||
if ( ! replaceAll )
|
||||
return true ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ReplaceTextNodes( oNode, regex, replaceValue ) )
|
||||
return true ;
|
||||
}
|
||||
}
|
||||
return false ;
|
||||
}
|
||||
|
||||
function GetRegexExpr()
|
||||
{
|
||||
if ( document.getElementById('chkWord').checked )
|
||||
var sExpr = '\\b' + document.getElementById('txtFind').value + '\\b' ;
|
||||
else
|
||||
var sExpr = document.getElementById('txtFind').value ;
|
||||
|
||||
return sExpr ;
|
||||
}
|
||||
|
||||
function GetCase()
|
||||
{
|
||||
return ( document.getElementById('chkCase').checked ? '' : 'i' ) ;
|
||||
}
|
||||
|
||||
function Ok()
|
||||
{
|
||||
if ( document.getElementById('txtFind').value.length == 0 )
|
||||
return ;
|
||||
|
||||
if ( oEditor.FCKBrowserInfo.IsIE )
|
||||
FindIE() ;
|
||||
else
|
||||
FindGecko() ;
|
||||
}
|
||||
|
||||
var oRange = null ;
|
||||
|
||||
function FindIE()
|
||||
{
|
||||
if ( oRange == null )
|
||||
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() ;
|
||||
oRange.select() ;
|
||||
oRange.collapse(false) ;
|
||||
oLastRangeFound = oRange ;
|
||||
}
|
||||
else
|
||||
{
|
||||
oRange = null ;
|
||||
alert( oEditor.FCKLang.DlgFindNotFoundMsg ) ;
|
||||
}
|
||||
}
|
||||
|
||||
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>
|
||||
<body onload="OnLoad()" scroll="no" style="OVERFLOW: hidden">
|
||||
<div align="center">
|
||||
This is my Plugin!
|
||||
</div>
|
||||
<table cellSpacing="3" cellPadding="2" width="100%" border="0">
|
||||
<tr>
|
||||
<td nowrap>
|
||||
<label for="txtFind" fckLang="DlgMyReplaceFindLbl">Find what:</label>
|
||||
</td>
|
||||
<td width="100%">
|
||||
<input id="txtFind" onkeyup="btnStat(this.form)" style="WIDTH: 100%" tabIndex="1" type="text">
|
||||
</td>
|
||||
<td>
|
||||
<input id="btnFind" style="WIDTH: 100%; PADDING-RIGHT: 5px; PADDING-LEFT: 5px" disabled
|
||||
onclick="Ok();" type="button" value="Find" fckLang="DlgMyFindFindBtn">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="bottom" colSpan="3">
|
||||
<input id="chkCase" tabIndex="3" type="checkbox"><label for="chkCase" fckLang="DlgMyReplaceCaseChk">Match
|
||||
case</label>
|
||||
<br>
|
||||
<div id="divWord" style="DISPLAY: none">
|
||||
<input id="chkWord" tabIndex="4" type="checkbox"><label for="chkWord" fckLang="DlgMyReplaceWordChk">Match
|
||||
whole word</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
29
standort/FCKeditor/_samples/_plugins/findreplace/lang/en.js
Normal file
29
standort/FCKeditor/_samples/_plugins/findreplace/lang/en.js
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* 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)
|
||||
*/
|
||||
|
||||
FCKLang['DlgMyReplaceTitle'] = 'Plugin - Replace' ;
|
||||
FCKLang['DlgMyReplaceFindLbl'] = 'Find what:' ;
|
||||
FCKLang['DlgMyReplaceReplaceLbl'] = 'Replace with:' ;
|
||||
FCKLang['DlgMyReplaceCaseChk'] = 'Match case' ;
|
||||
FCKLang['DlgMyReplaceReplaceBtn'] = 'Replace' ;
|
||||
FCKLang['DlgMyReplaceReplAllBtn'] = 'Replace All' ;
|
||||
FCKLang['DlgMyReplaceWordChk'] = 'Match whole word' ;
|
||||
|
||||
FCKLang['DlgMyFindTitle'] = 'Plugin - Find' ;
|
||||
FCKLang['DlgMyFindFindBtn'] = 'Find' ;
|
29
standort/FCKeditor/_samples/_plugins/findreplace/lang/fr.js
Normal file
29
standort/FCKeditor/_samples/_plugins/findreplace/lang/fr.js
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* 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)
|
||||
*/
|
||||
|
||||
FCKLang['DlgMyReplaceTitle'] = 'Plugin - Remplacer' ;
|
||||
FCKLang['DlgMyReplaceFindLbl'] = 'Chercher:' ;
|
||||
FCKLang['DlgMyReplaceReplaceLbl'] = 'Remplacer par:' ;
|
||||
FCKLang['DlgMyReplaceCaseChk'] = 'Respecter la casse' ;
|
||||
FCKLang['DlgMyReplaceReplaceBtn'] = 'Remplacer' ;
|
||||
FCKLang['DlgMyReplaceReplAllBtn'] = 'Remplacer Tout' ;
|
||||
FCKLang['DlgMyReplaceWordChk'] = 'Mot entier' ;
|
||||
|
||||
FCKLang['DlgMyFindTitle'] = 'Plugin - Chercher' ;
|
||||
FCKLang['DlgMyFindFindBtn'] = 'Chercher' ;
|
29
standort/FCKeditor/_samples/_plugins/findreplace/lang/it.js
Normal file
29
standort/FCKeditor/_samples/_plugins/findreplace/lang/it.js
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* 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)
|
||||
*/
|
||||
|
||||
FCKLang['DlgMyReplaceTitle'] = 'Plugin - Sostituisci' ;
|
||||
FCKLang['DlgMyReplaceFindLbl'] = 'Trova:' ;
|
||||
FCKLang['DlgMyReplaceReplaceLbl'] = 'Sostituisci con:' ;
|
||||
FCKLang['DlgMyReplaceCaseChk'] = 'Maiuscole/minuscole' ;
|
||||
FCKLang['DlgMyReplaceReplaceBtn'] = 'Sostituisci' ;
|
||||
FCKLang['DlgMyReplaceReplAllBtn'] = 'Sostituisci tutto' ;
|
||||
FCKLang['DlgMyReplaceWordChk'] = 'Parola intera' ;
|
||||
|
||||
FCKLang['DlgMyFindTitle'] = 'Plugin - Cerca' ;
|
||||
FCKLang['DlgMyFindFindBtn'] = 'Cerca' ;
|
BIN
standort/FCKeditor/_samples/_plugins/findreplace/replace.gif
Normal file
BIN
standort/FCKeditor/_samples/_plugins/findreplace/replace.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 326 B |
131
standort/FCKeditor/_samples/_plugins/findreplace/replace.html
Normal file
131
standort/FCKeditor/_samples/_plugins/findreplace/replace.html
Normal file
@ -0,0 +1,131 @@
|
||||
<!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)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta content="noindex, nofollow" name="robots">
|
||||
<script type="text/javascript">
|
||||
|
||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||
|
||||
function OnLoad()
|
||||
{
|
||||
// First of all, translate the dialog box texts
|
||||
oEditor.FCKLanguageManager.TranslatePage( document ) ;
|
||||
|
||||
window.parent.SetAutoSize( true ) ;
|
||||
}
|
||||
|
||||
function btnStat(frm)
|
||||
{
|
||||
document.getElementById('btnReplace').disabled =
|
||||
document.getElementById('btnReplaceAll').disabled =
|
||||
( document.getElementById('txtFind').value.length == 0 ) ;
|
||||
}
|
||||
|
||||
function ReplaceTextNodes( parentNode, regex, replaceValue, replaceAll, hasFound )
|
||||
{
|
||||
for ( var i = 0 ; i < parentNode.childNodes.length ; i++ )
|
||||
{
|
||||
var oNode = parentNode.childNodes[i] ;
|
||||
if ( oNode.nodeType == 3 )
|
||||
{
|
||||
var sReplaced = oNode.nodeValue.replace( regex, replaceValue ) ;
|
||||
if ( oNode.nodeValue != sReplaced )
|
||||
{
|
||||
oNode.nodeValue = sReplaced ;
|
||||
if ( ! replaceAll )
|
||||
return true ;
|
||||
hasFound = true ;
|
||||
}
|
||||
}
|
||||
|
||||
hasFound = ReplaceTextNodes( oNode, regex, replaceValue, replaceAll, hasFound ) ;
|
||||
if ( ! replaceAll && hasFound )
|
||||
return true ;
|
||||
}
|
||||
|
||||
return hasFound ;
|
||||
}
|
||||
|
||||
function GetRegexExpr()
|
||||
{
|
||||
if ( document.getElementById('chkWord').checked )
|
||||
var sExpr = '\\b' + document.getElementById('txtFind').value + '\\b' ;
|
||||
else
|
||||
var sExpr = document.getElementById('txtFind').value ;
|
||||
|
||||
return sExpr ;
|
||||
}
|
||||
|
||||
function GetCase()
|
||||
{
|
||||
return ( document.getElementById('chkCase').checked ? '' : 'i' ) ;
|
||||
}
|
||||
|
||||
function Replace()
|
||||
{
|
||||
var oRegex = new RegExp( GetRegexExpr(), GetCase() ) ;
|
||||
ReplaceTextNodes( oEditor.FCK.EditorDocument.body, oRegex, document.getElementById('txtReplace').value, false ) ;
|
||||
}
|
||||
|
||||
function ReplaceAll()
|
||||
{
|
||||
var oRegex = new RegExp( GetRegexExpr(), GetCase() + 'g' ) ;
|
||||
ReplaceTextNodes( oEditor.FCK.EditorDocument.body, oRegex, document.getElementById('txtReplace').value, true ) ;
|
||||
window.parent.Cancel() ;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="OnLoad()" scroll="no" style="OVERFLOW: hidden">
|
||||
<div align="center">
|
||||
This is my Plugin!
|
||||
</div>
|
||||
<table cellSpacing="3" cellPadding="2" width="100%" border="0">
|
||||
<tr>
|
||||
<td noWrap><label for="txtFind" fckLang="DlgMyReplaceFindLbl">Find what:</label>
|
||||
</td>
|
||||
<td width="100%"><input id="txtFind" onkeyup="btnStat(this.form)" style="WIDTH: 100%" tabIndex="1" type="text">
|
||||
</td>
|
||||
<td><input id="btnReplace" style="WIDTH: 100%" disabled onclick="Replace();" type="button"
|
||||
value="Replace" fckLang="DlgMyReplaceReplaceBtn">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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">
|
||||
</td>
|
||||
<td><input id="btnReplaceAll" disabled onclick="ReplaceAll()" type="button" value="Replace All"
|
||||
fckLang="DlgMyReplaceReplAllBtn">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td vAlign="bottom" colSpan="3"> <input id="chkCase" tabIndex="3" type="checkbox"><label for="chkCase" fckLang="DlgMyReplaceCaseChk">Match
|
||||
case</label>
|
||||
<br>
|
||||
<input id="chkWord" tabIndex="4" type="checkbox"><label for="chkWord" fckLang="DlgMyReplaceWordChk">Match
|
||||
whole word</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
69
standort/FCKeditor/_samples/_plugins/samples/fckplugin.js
Normal file
69
standort/FCKeditor/_samples/_plugins/samples/fckplugin.js
Normal file
@ -0,0 +1,69 @@
|
||||
/*
|
||||
* 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)
|
||||
*/
|
||||
|
||||
// Here we define our custom Style combo, with custom widths.
|
||||
var oMyBigStyleCombo = new FCKToolbarStyleCombo() ;
|
||||
oMyBigStyleCombo.FieldWidth = 250 ;
|
||||
oMyBigStyleCombo.PanelWidth = 300 ;
|
||||
FCKToolbarItems.RegisterItem( 'My_BigStyle', oMyBigStyleCombo ) ;
|
||||
|
||||
|
||||
// ##### Defining a custom context menu entry.
|
||||
|
||||
// ## 1. Define the command to be executed when selecting the context menu item.
|
||||
var oMyCMCommand = new Object() ;
|
||||
oMyCMCommand.Name = 'OpenImage' ;
|
||||
|
||||
// This is the standard function used to execute the command (called when clicking in the context menu item).
|
||||
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 ) ;
|
||||
}
|
||||
|
||||
// This is the standard function used to retrieve the command state (it could be disabled for some reason).
|
||||
oMyCMCommand.GetState = function()
|
||||
{
|
||||
// Let's make it always enabled.
|
||||
return FCK_TRISTATE_OFF ;
|
||||
}
|
||||
|
||||
// ## 2. Register our custom command.
|
||||
FCKCommands.RegisterCommand( 'OpenImage', oMyCMCommand ) ;
|
||||
|
||||
// ## 3. Define the context menu "listener".
|
||||
var oMyContextMenuListener = new Object() ;
|
||||
|
||||
// This is the standard function called right before sowing the context menu.
|
||||
oMyContextMenuListener.AddItems = function( contextMenu, tag, tagName )
|
||||
{
|
||||
// Let's show our custom option only for images.
|
||||
if ( tagName == 'IMG' )
|
||||
{
|
||||
contextMenu.AddSeparator() ;
|
||||
contextMenu.AddItem( 'OpenImage', 'Open image in a new window (Custom)' ) ;
|
||||
}
|
||||
}
|
||||
|
||||
// ## 4. Register our context menu listener.
|
||||
FCK.ContextMenu.RegisterListener( oMyContextMenuListener ) ;
|
1
standort/FCKeditor/_samples/afp/fck.afpa
Normal file
1
standort/FCKeditor/_samples/afp/fck.afpa
Normal file
@ -0,0 +1 @@
|
||||
<application ID="fck"/>
|
121
standort/FCKeditor/_samples/afp/fck.afpa.code
Normal file
121
standort/FCKeditor/_samples/afp/fck.afpa.code
Normal file
@ -0,0 +1,121 @@
|
||||
DEFINE CLASS fckeditor AS custom
|
||||
cInstanceName =""
|
||||
BasePath =""
|
||||
cWIDTH =""
|
||||
cHEIGHT =""
|
||||
ToolbarSet =""
|
||||
cValue=""
|
||||
DIMENSION aConfig(10,2)
|
||||
|
||||
&& -----------------------------------------------------------------------
|
||||
FUNCTION fckeditor( tcInstanceName )
|
||||
LOCAL lnLoop,lnLoop2
|
||||
THIS.cInstanceName = tcInstanceName
|
||||
THIS.BasePath = '../../'
|
||||
THIS.cWIDTH = '100%'
|
||||
THIS.cHEIGHT = '200'
|
||||
THIS.ToolbarSet = 'Default'
|
||||
THIS.cValue = ''
|
||||
FOR lnLoop=1 TO 10
|
||||
FOR lnLoop2=1 TO 2
|
||||
THIS.aConfig(lnLoop,lnLoop2) = ""
|
||||
NEXT
|
||||
NEXT
|
||||
RETURN
|
||||
ENDFUNC
|
||||
|
||||
|
||||
&& -----------------------------------------------------------------------
|
||||
FUNCTION CREATE()
|
||||
RETURN(THIS.CreateHtml())
|
||||
ENDFUNC
|
||||
|
||||
&& -----------------------------------------------------------------------
|
||||
FUNCTION CreateHtml()
|
||||
LOCAL html
|
||||
LOCAL lcLink
|
||||
|
||||
HtmlValue = THIS.cValue && HTMLSPECIALCHARS()
|
||||
|
||||
html = [<div>]
|
||||
IF THIS.IsCompatible()
|
||||
lcLink = THIS.BasePath+[editor/fckeditor.html?InstanceName=]+THIS.cInstanceName
|
||||
|
||||
IF ( THIS.ToolbarSet # '' )
|
||||
lcLink = lcLink + [Toolbar=]+THIS.ToolbarSet
|
||||
ENDIF
|
||||
|
||||
&& Render the LINKED HIDDEN FIELD.
|
||||
html = html + [<input type="hidden" id="]+THIS.cInstanceName +[" name="]+THIS.cInstanceName +[" value="]+HtmlValue+[">]
|
||||
|
||||
&& Render the configurations HIDDEN FIELD.
|
||||
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>]
|
||||
ELSE
|
||||
IF ( AT("%", THIS.cWIDTH)=0 )
|
||||
WidthCSS = THIS.cWIDTH + 'px'
|
||||
ELSE
|
||||
WidthCSS = THIS.cWIDTH
|
||||
ENDIF
|
||||
|
||||
IF ( AT("%",THIS.cHEIGHT)=0 )
|
||||
HeightCSS = THIS.cHEIGHT + 'px'
|
||||
ELSE
|
||||
HeightCSS = THIS.cHEIGHT
|
||||
ENDIF
|
||||
|
||||
html = html + [<textarea name="]+THIS.cInstanceName +[" rows="4" cols="40" style="width: ]+WidthCSS+[ height: ]+HeightCSS+[" wrap="virtual">]+HtmlValue+[</textarea>]
|
||||
ENDIF
|
||||
|
||||
html = html + [</div>]
|
||||
|
||||
RETURN (html)
|
||||
ENDFUNC
|
||||
|
||||
|
||||
&& -----------------------------------------------------------------------
|
||||
FUNCTION IsCompatible()
|
||||
LOCAL llRetval
|
||||
LOCAL sAgent
|
||||
|
||||
llRetval=.F.
|
||||
|
||||
sAgent= LOWER(Request.ServerVariables("HTTP_USER_AGENT"))
|
||||
|
||||
IF AT("msie",sAgent) >0 .AND. AT("mac",sAgent)=0 .AND. AT("opera",sAgent)=0
|
||||
iVersion=VAL(SUBSTR(sAgent,AT("msie",sAgent)+5,3))
|
||||
llRetval= iVersion > 5.5
|
||||
ELSE
|
||||
IF AT("gecko",sAgent)>0
|
||||
iVersion=VAL(SUBSTR(sAgent,AT("gecko/",sAgent)+6,8))
|
||||
llRetval =iVersion > 20030210
|
||||
ENDIF
|
||||
ENDIF
|
||||
RETURN (llRetval)
|
||||
ENDFUNC
|
||||
|
||||
&& -----------------------------------------------------------------------
|
||||
FUNCTION GetConfigFieldString()
|
||||
LOCAL sParams
|
||||
LOCAL bFirst
|
||||
LOCAL sKey
|
||||
sParams = ""
|
||||
bFirst = .T.
|
||||
FOR lnLoop=1 TO 10 && ALEN(this.aconfig)
|
||||
IF !EMPTY(THIS.aConfig(lnLoop,1))
|
||||
IF bFirst = .F.
|
||||
sParams = sParams + "&"
|
||||
ELSE
|
||||
bFirst = .F.
|
||||
ENDIF
|
||||
sParams = sParams +THIS.aConfig(lnLoop,1)+[=]+THIS.aConfig(lnLoop,2)
|
||||
ELSE
|
||||
EXIT
|
||||
ENDIF
|
||||
NEXT
|
||||
RETURN(sParams)
|
||||
ENDFUNC
|
||||
ENDDEFINE
|
||||
|
52
standort/FCKeditor/_samples/afp/sample01.afp
Normal file
52
standort/FCKeditor/_samples/afp/sample01.afp
Normal file
@ -0,0 +1,52 @@
|
||||
<%
|
||||
* 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)
|
||||
*
|
||||
%>
|
||||
|
||||
<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="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - AFP - Sample 1</h1>
|
||||
This sample displays a normal HTML form with an FCKeditor with full features enabled.
|
||||
<hr>
|
||||
<form action="sampleposteddata.afp" method="post" target="_blank">
|
||||
<%
|
||||
|
||||
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>.]
|
||||
|
||||
oFCKeditor = CREATEOBJECT("FCKeditor")
|
||||
oFCKeditor.fckeditor("FCKeditor1")
|
||||
oFCKeditor.BasePath = sBasePath
|
||||
oFCKeditor.cValue = lcText
|
||||
|
||||
? oFCKeditor.Create()
|
||||
|
||||
%>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
54
standort/FCKeditor/_samples/afp/sampleposteddata.afp
Normal file
54
standort/FCKeditor/_samples/afp/sampleposteddata.afp
Normal file
@ -0,0 +1,54 @@
|
||||
<%
|
||||
* 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)
|
||||
*
|
||||
%>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<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="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Samples - Posted Data</h1>
|
||||
This page lists all data posted by the form.
|
||||
<hr>
|
||||
<table width="100%" border="1" cellspacing="0" bordercolor="#999999">
|
||||
<tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
|
||||
<td nowrap>Field Name </td>
|
||||
<td>Value</td>
|
||||
</tr>
|
||||
<%
|
||||
lcForm=REQUEST.Form()
|
||||
lcForm=STRTRAN(lcForm,"&",CHR(13)+CHR(10))
|
||||
|
||||
FOR lnLoop=1 TO MEMLINES(lcForm)
|
||||
lcZeile=ALLTRIM(MLINE(lcForm,lnLoop))
|
||||
IF AT("=",lcZeile)>0
|
||||
lcVariable=UPPER(ALLTRIM(LEFT(lcZeile,AT("=",lcZeile)-1)))
|
||||
lcWert=ALLTRIM(RIGHT(lcZeile,LEN(lcZeile)-AT("=",lcZeile)))
|
||||
lcWert=Server.UrlDecode( lcWert )
|
||||
|
||||
? [<tr><td>]+lcVariable+[ =</td><td>]+lcWert+[</td></tr>]
|
||||
ENDIF
|
||||
NEXT
|
||||
%>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
58
standort/FCKeditor/_samples/asp/sample01.asp
Normal file
58
standort/FCKeditor/_samples/asp/sample01.asp
Normal file
@ -0,0 +1,58 @@
|
||||
<%@ 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)
|
||||
-->
|
||||
<% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %>
|
||||
<!-- #INCLUDE file="../../fckeditor.asp" -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<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" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - ASP - Sample 1
|
||||
</h1>
|
||||
<div>
|
||||
This sample displays a normal HTML form with an FCKeditor with full features enabled.
|
||||
</div>
|
||||
<hr />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<%
|
||||
' 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.
|
||||
Dim sBasePath
|
||||
sBasePath = Request.ServerVariables("PATH_INFO")
|
||||
sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )
|
||||
|
||||
Dim oFCKeditor
|
||||
Set oFCKeditor = New FCKeditor
|
||||
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 "FCKeditor1"
|
||||
%>
|
||||
<br />
|
||||
<input type="submit" value="Submit" />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
104
standort/FCKeditor/_samples/asp/sample02.asp
Normal file
104
standort/FCKeditor/_samples/asp/sample02.asp
Normal file
@ -0,0 +1,104 @@
|
||||
<%@ 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)
|
||||
-->
|
||||
<% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %>
|
||||
<!-- #INCLUDE file="../../fckeditor.asp" -->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<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="../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 - ASP - 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:
|
||||
</td>
|
||||
<td>
|
||||
<select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<%
|
||||
' 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.
|
||||
Dim sBasePath
|
||||
sBasePath = Request.ServerVariables("PATH_INFO")
|
||||
sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )
|
||||
|
||||
Dim oFCKeditor
|
||||
Set oFCKeditor = New FCKeditor
|
||||
oFCKeditor.BasePath = sBasePath
|
||||
|
||||
If Request.QueryString("Lang") = "" Then
|
||||
oFCKeditor.Config("AutoDetectLanguage") = True
|
||||
oFCKeditor.Config("DefaultLanguage") = "en"
|
||||
Else
|
||||
oFCKeditor.Config("AutoDetectLanguage") = False
|
||||
oFCKeditor.Config("DefaultLanguage") = Request.QueryString("Lang")
|
||||
End If
|
||||
|
||||
oFCKeditor.Value = "This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>."
|
||||
oFCKeditor.Create "FCKeditor1"
|
||||
%>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
88
standort/FCKeditor/_samples/asp/sample03.asp
Normal file
88
standort/FCKeditor/_samples/asp/sample03.asp
Normal file
@ -0,0 +1,88 @@
|
||||
<%@ 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)
|
||||
-->
|
||||
<% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %>
|
||||
<!-- #INCLUDE file="../../fckeditor.asp" -->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<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="../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 - ASP - 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:
|
||||
</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.asp" method="post" target="_blank">
|
||||
<%
|
||||
' 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.
|
||||
Dim sBasePath
|
||||
sBasePath = Request.ServerVariables("PATH_INFO")
|
||||
sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )
|
||||
|
||||
Dim oFCKeditor
|
||||
Set oFCKeditor = New FCKeditor
|
||||
oFCKeditor.BasePath = sBasePath
|
||||
|
||||
If Request.QueryString("Toolbar") <> "" Then
|
||||
oFCKeditor.ToolbarSet = Server.HTMLEncode( Request.QueryString("Toolbar") )
|
||||
End If
|
||||
|
||||
oFCKeditor.Value = "This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>."
|
||||
oFCKeditor.Create "FCKeditor1"
|
||||
%>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
94
standort/FCKeditor/_samples/asp/sample04.asp
Normal file
94
standort/FCKeditor/_samples/asp/sample04.asp
Normal file
@ -0,0 +1,94 @@
|
||||
<%@ 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)
|
||||
-->
|
||||
<% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %>
|
||||
<!-- #INCLUDE file="../../fckeditor.asp" -->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<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="../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 - ASP - 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:
|
||||
</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.asp" method="post" target="_blank">
|
||||
<%
|
||||
' 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.
|
||||
Dim sBasePath
|
||||
sBasePath = Request.ServerVariables("PATH_INFO")
|
||||
sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )
|
||||
|
||||
Dim oFCKeditor
|
||||
Set oFCKeditor = New FCKeditor
|
||||
oFCKeditor.BasePath = sBasePath
|
||||
|
||||
If Request.QueryString("Skin") <> "" Then
|
||||
oFCKeditor.Config("SkinPath") = sBasePath + "editor/skins/" & Server.HTMLEncode( Request.QueryString("Skin") ) + "/"
|
||||
End If
|
||||
|
||||
oFCKeditor.Value = "This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>."
|
||||
oFCKeditor.Create "FCKeditor1"
|
||||
%>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
49
standort/FCKeditor/_samples/asp/sampleposteddata.asp
Normal file
49
standort/FCKeditor/_samples/asp/sampleposteddata.asp
Normal file
@ -0,0 +1,49 @@
|
||||
<%@ 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)
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<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="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Samples - Posted Data</h1>
|
||||
This page lists all data posted by the form.
|
||||
<hr>
|
||||
<table width="100%" border="1" cellspacing="0" bordercolor="#999999">
|
||||
<tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
|
||||
<td noWrap>Field Name </td>
|
||||
<td>Value</td>
|
||||
</tr>
|
||||
<%
|
||||
Dim sForm
|
||||
For Each sForm in Request.Form
|
||||
%>
|
||||
<tr>
|
||||
<td valign="top" nowrap><b><%=sForm%></b></td>
|
||||
<td width="100%"><%=Server.HTMLEncode( Request.Form(sForm) )%></td>
|
||||
</tr>
|
||||
<% Next %>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
84
standort/FCKeditor/_samples/cfm/sample01.cfm
Normal file
84
standort/FCKeditor/_samples/cfm/sample01.cfm
Normal file
@ -0,0 +1,84 @@
|
||||
<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)
|
||||
--->
|
||||
|
||||
<cfoutput>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<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="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
|
||||
<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
|
||||
template="../../fckeditor.cfm"
|
||||
basePath="#Left(cgi.script_name, FindNoCase('_samples', cgi.script_name)-1)#"
|
||||
instanceName="myEditor"
|
||||
value='This is some sample text. You are using <a href="http://fckeditor.net/" target="_blank">FCKeditor</a>.'
|
||||
width="100%"
|
||||
height="200"
|
||||
>
|
||||
<cfoutput>
|
||||
<br />
|
||||
<input type="submit" value="Submit">
|
||||
<br />
|
||||
</form>
|
||||
</cfoutput>
|
||||
|
||||
<cfif isDefined( 'FORM.fieldnames' )>
|
||||
<cfoutput>
|
||||
<style>
|
||||
<!--
|
||||
td, th { font: 11px Verdana, Arial, Helv, Helvetica, sans-serif; }
|
||||
-->
|
||||
</style>
|
||||
<table border="1" cellspacing="0" cellpadding="2" bordercolor="darkblue" bordercolordark="darkblue" bordercolorlight="darkblue">
|
||||
<tr>
|
||||
<th colspan="2" bgcolor="darkblue"><font color="white"><strong>Dump of FORM Variables</strong></font></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="lightskyblue">FieldNames</td>
|
||||
<td>#FORM.fieldNames#</td>
|
||||
</tr>
|
||||
<cfloop list="#FORM.fieldnames#" index="key">
|
||||
<tr>
|
||||
<td valign="top" bgcolor="lightskyblue">#key#</td>
|
||||
<td>#HTMLEditFormat(evaluate("FORM.#key#"))#</td>
|
||||
</tr>
|
||||
</cfloop>
|
||||
</table>
|
||||
</cfoutput>
|
||||
</cfif>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<cfsetting enablecfoutputonly="false">
|
90
standort/FCKeditor/_samples/cfm/sample02_mx.cfm
Normal file
90
standort/FCKeditor/_samples/cfm/sample02_mx.cfm
Normal file
@ -0,0 +1,90 @@
|
||||
<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)
|
||||
--->
|
||||
|
||||
<!--- ::
|
||||
* 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/">
|
||||
* OR:
|
||||
* <cfset SERVER.userFilesPath = "/UserFiles/">
|
||||
* OR:
|
||||
* <cfset request.FCKeditor.userFilesPath = "/UserFiles/">
|
||||
* OR:
|
||||
* <cfset application.FCKeditor.userFilesPath = "/UserFiles/">
|
||||
* OR:
|
||||
* <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
|
||||
:: --->
|
||||
|
||||
<cfoutput>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<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="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - ColdFusion Component (CFC) - Sample 2</h1>
|
||||
|
||||
This sample displays a normal HTML form with a FCKeditor with full features enabled; invoked by a ColdFusion Component.
|
||||
<hr>
|
||||
|
||||
<form method="POST" action="#cgi.script_name#">
|
||||
</cfoutput>
|
||||
|
||||
<cfif listFirst( server.coldFusion.productVersion ) LT 6>
|
||||
<cfoutput><br><em style="color: red;">This sample works only with a ColdFusion MX server and higher, because it uses some advantages of this version.</em></cfoutput>
|
||||
<cfabort>
|
||||
</cfif>
|
||||
|
||||
<cfscript>
|
||||
// Calculate basepath for FCKeditor. It's in the folder right above _samples
|
||||
basePath = Left(cgi.script_name, FindNoCase('_samples', cgi.script_name)-1);
|
||||
|
||||
fckEditor = createObject("component", "#basePath#fckeditor");
|
||||
fckEditor.instanceName = "myEditor";
|
||||
fckEditor.value = 'This is some sample text. You are using <a href="http://fckeditor.net/" target="_blank">FCKeditor</a>.';
|
||||
fckEditor.basePath = basePath;
|
||||
fckEditor.width = "100%";
|
||||
fckEditor.height = 300;
|
||||
fckEditor.create(); // create the editor.
|
||||
</cfscript>
|
||||
|
||||
<cfoutput>
|
||||
<br />
|
||||
<input type="submit" value="Submit">
|
||||
<hr />
|
||||
</cfoutput>
|
||||
|
||||
<cfdump
|
||||
var="#FORM#"
|
||||
label="Dump of FORM Variables"
|
||||
>
|
||||
|
||||
<cfoutput></form></body></html></cfoutput>
|
||||
|
||||
<cfsetting enablecfoutputonly="false">
|
30
standort/FCKeditor/_samples/default.html
Normal file
30
standort/FCKeditor/_samples/default.html
Normal file
@ -0,0 +1,30 @@
|
||||
<!--
|
||||
* 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)
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Samples</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
</head>
|
||||
<frameset rows="60,*">
|
||||
<frame src="sampleslist.html" noresize scrolling="no">
|
||||
<frame name="Sample" src="html/sample01.html" noresize>
|
||||
</frameset>
|
||||
</html>
|
55
standort/FCKeditor/_samples/html/sample01.html
Normal file
55
standort/FCKeditor/_samples/html/sample01.html
Normal file
@ -0,0 +1,55 @@
|
||||
<!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)
|
||||
-->
|
||||
<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>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - JavaScript - Sample 1
|
||||
</h1>
|
||||
<div>
|
||||
This sample displays a normal HTML form with an FCKeditor with full features enabled.
|
||||
</div>
|
||||
<hr />
|
||||
<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')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.Height = 300 ;
|
||||
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>
|
59
standort/FCKeditor/_samples/html/sample02.html
Normal file
59
standort/FCKeditor/_samples/html/sample02.html
Normal file
@ -0,0 +1,59 @@
|
||||
<!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)
|
||||
-->
|
||||
<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">
|
||||
|
||||
window.onload = function()
|
||||
{
|
||||
// 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')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.ReplaceTextarea() ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - JavaScript - Sample 2</h1>
|
||||
<div>
|
||||
This sample displays a normal HTML form with an FCKeditor with full features enabled.
|
||||
It uses the "ReplaceTextarea" command to create the editor.
|
||||
</div>
|
||||
<hr />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<div>
|
||||
<textarea name="FCKeditor1" rows="10" cols="80" style="width: 100%; height: 200px">This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</textarea>
|
||||
</div>
|
||||
<br />
|
||||
<input type="submit" value="Submit" />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
132
standort/FCKeditor/_samples/html/sample03.html
Normal file
132
standort/FCKeditor/_samples/html/sample03.html
Normal file
@ -0,0 +1,132 @@
|
||||
<!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)
|
||||
-->
|
||||
<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">
|
||||
|
||||
var bIsLoaded = false ;
|
||||
|
||||
function FCKeditor_OnComplete( editorInstance )
|
||||
{
|
||||
if ( bIsLoaded )
|
||||
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] } ) ;
|
||||
|
||||
aLanguages.sort( SortLanguage ) ;
|
||||
|
||||
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 ;
|
||||
}
|
||||
|
||||
function SortLanguage( langA, langB )
|
||||
{
|
||||
return ( langA.Name < langB.Name ? -1 : langA.Name > langB.Name ? 1 : 0 ) ;
|
||||
}
|
||||
|
||||
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 + "?" + languageCode ;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - JavaScript - Sample 3</h1>
|
||||
<div>
|
||||
This sample shows the editor in all its available languages.
|
||||
</div>
|
||||
<hr />
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
Select a language:
|
||||
</td>
|
||||
<td>
|
||||
<select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<span id="eNumLangs"></span>
|
||||
</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')) ;
|
||||
|
||||
var sLang ;
|
||||
if ( document.location.search.length > 1 )
|
||||
sLang = document.location.search.substr(1) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
if ( sLang == null )
|
||||
{
|
||||
oFCKeditor.Config["AutoDetectLanguage"] = true ;
|
||||
oFCKeditor.Config["DefaultLanguage"] = "en" ;
|
||||
}
|
||||
else
|
||||
{
|
||||
oFCKeditor.Config["AutoDetectLanguage"] = false ;
|
||||
oFCKeditor.Config["DefaultLanguage"] = sLang ;
|
||||
}
|
||||
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>
|
91
standort/FCKeditor/_samples/html/sample04.html
Normal file
91
standort/FCKeditor/_samples/html/sample04.html
Normal file
@ -0,0 +1,91 @@
|
||||
<!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)
|
||||
-->
|
||||
<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 FCKeditor_OnComplete( editorInstance )
|
||||
{
|
||||
var oCombo = document.getElementById( 'cmbToolbars' ) ;
|
||||
oCombo.value = editorInstance.ToolbarSet.Name ;
|
||||
oCombo.style.visibility = '' ;
|
||||
}
|
||||
|
||||
function ChangeLanguage( languageCode )
|
||||
{
|
||||
window.location.href = window.location.pathname + "?" + languageCode ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - JavaScript - Sample 4</h1>
|
||||
<div>
|
||||
This sample shows how to change the editor toolbar.
|
||||
</div>
|
||||
<hr />
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
Select the toolbar to load:
|
||||
</td>
|
||||
<td>
|
||||
<select id="cmbToolbars" onchange="ChangeLanguage(this.value);" style="visibility: hidden">
|
||||
<option value="Default" selected="selected">Default</option>
|
||||
<option value="Basic">Basic</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')) ;
|
||||
|
||||
// Get the toolbar from the URL.
|
||||
var sToolbar ;
|
||||
if ( document.location.search.length > 1 )
|
||||
sToolbar = document.location.search.substr(1) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
|
||||
if ( sToolbar != null )
|
||||
oFCKeditor.ToolbarSet = sToolbar ;
|
||||
|
||||
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>
|
121
standort/FCKeditor/_samples/html/sample05.html
Normal file
121
standort/FCKeditor/_samples/html/sample05.html
Normal file
@ -0,0 +1,121 @@
|
||||
<!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)
|
||||
-->
|
||||
<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 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 ChangeLanguage( languageCode )
|
||||
{
|
||||
window.location.href = window.location.pathname + "?" + languageCode ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - JavaScript - Sample 5</h1>
|
||||
<div>
|
||||
This sample shows how to change the editor skin.
|
||||
</div>
|
||||
<hr />
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
Select the skin to load:
|
||||
</td>
|
||||
<td>
|
||||
<select id="cmbSkins" onchange="ChangeLanguage(this.value);" style="visibility: hidden">
|
||||
<option value="default" selected="selected">Default</option>
|
||||
<option value="office2003">Office 2003</option>
|
||||
<option value="silver">Silver</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')) ;
|
||||
|
||||
// Get the skin from the URL.
|
||||
var sSkin ;
|
||||
if ( document.location.search.length > 1 )
|
||||
sSkin = document.location.search.substr(1) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
|
||||
if ( sSkin != null )
|
||||
{
|
||||
var sSkinPath = sBasePath + 'editor/skins/' + sSkin + '/' ;
|
||||
oFCKeditor.Config['SkinPath'] = sSkinPath ;
|
||||
|
||||
// The following switch is optional. It is done to enhance the loading
|
||||
// time of the toolbar, by preloading the images used on it.
|
||||
switch ( sSkin )
|
||||
{
|
||||
case 'office2003' :
|
||||
oFCKeditor.Config['PreloadImages'] =
|
||||
sSkinPath + 'images/toolbar.start.gif' + ';' +
|
||||
sSkinPath + 'images/toolbar.end.gif' + ';' +
|
||||
sSkinPath + 'images/toolbar.bg.gif' + ';' +
|
||||
sSkinPath + 'images/toolbar.buttonarrow.gif' ;
|
||||
break ;
|
||||
|
||||
case 'silver' :
|
||||
oFCKeditor.Config['PreloadImages'] =
|
||||
sSkinPath + 'images/toolbar.start.gif' + ';' +
|
||||
sSkinPath + 'images/toolbar.end.gif' + ';' +
|
||||
sSkinPath + 'images/toolbar.buttonbg.gif' + ';' +
|
||||
sSkinPath + 'images/toolbar.buttonarrow.gif' ;
|
||||
break ;
|
||||
}
|
||||
}
|
||||
|
||||
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>
|
45
standort/FCKeditor/_samples/html/sample06.config.js
Normal file
45
standort/FCKeditor/_samples/html/sample06.config.js
Normal file
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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)
|
||||
*/
|
||||
|
||||
// Set our sample toolbar.
|
||||
FCKConfig.ToolbarSets['PluginTest'] = [
|
||||
['SourceSimple'],
|
||||
['My_Find','My_Replace','-','Placeholder'],
|
||||
['StyleSimple','FontFormatSimple','FontNameSimple','FontSizeSimple'],
|
||||
['Table','-','TableInsertRow','TableDeleteRows','TableInsertColumn','TableDeleteColumns','TableInsertCell','TableDeleteCells','TableMergeCells','TableSplitCell'],
|
||||
['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink'],
|
||||
'/',
|
||||
['My_BigStyle','-','Smiley','-','About']
|
||||
] ;
|
||||
|
||||
// Change the default plugin path.
|
||||
FCKConfig.PluginsPath = FCKConfig.BasePath.substr(0, FCKConfig.BasePath.length - 7) + '_samples/_plugins/' ;
|
||||
|
||||
// Add our plugin to the plugins list.
|
||||
// FCKConfig.Plugins.Add( pluginName, availableLanguages )
|
||||
// pluginName: The plugin name. The plugin directory must match this name.
|
||||
// availableLanguages: a list of available language files for the plugin (separated by a comma).
|
||||
FCKConfig.Plugins.Add( 'findreplace', 'en,it,fr' ) ;
|
||||
FCKConfig.Plugins.Add( 'samples' ) ;
|
||||
|
||||
// If you want to use plugins found on other directories, just use the third parameter.
|
||||
var sOtherPluginPath = FCKConfig.BasePath.substr(0, FCKConfig.BasePath.length - 7) + 'editor/plugins/' ;
|
||||
FCKConfig.Plugins.Add( 'placeholder', 'en,it,de,fr', sOtherPluginPath ) ;
|
||||
FCKConfig.Plugins.Add( 'tablecommands', null, sOtherPluginPath ) ;
|
||||
FCKConfig.Plugins.Add( 'simplecommands', null, sOtherPluginPath ) ;
|
69
standort/FCKeditor/_samples/html/sample06.html
Normal file
69
standort/FCKeditor/_samples/html/sample06.html
Normal file
@ -0,0 +1,69 @@
|
||||
<!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)
|
||||
-->
|
||||
<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>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - JavaScript - 6</h1>
|
||||
<div>
|
||||
This sample shows some sample plugins implementations. Things to note:<br />
|
||||
<ul>
|
||||
<li>In the toolbar, you will find sample "Find" and "Replace" plugins that do exactly
|
||||
the same thing that the built in ones do. It just shows how to do that with a custom
|
||||
implementation. Use the green toolbar buttons the test then. </li>
|
||||
<li>There is also another sample plugin that is available in the package: the "Placeholder"
|
||||
command (use the yellow icon). </li>
|
||||
<li>It also shows a custom context menu option when right cliking on images (insert
|
||||
a smiley to test it).</li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr />
|
||||
<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')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
|
||||
// Set the custom configurations file path (in this way the original file is mantained).
|
||||
oFCKeditor.Config['CustomConfigurationsPath'] = sBasePath + '_samples/html/sample06.config.js' ;
|
||||
|
||||
// Let's use a custom toolbar for this sample.
|
||||
oFCKeditor.ToolbarSet = 'PluginTest' ;
|
||||
|
||||
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>
|
55
standort/FCKeditor/_samples/html/sample07.html
Normal file
55
standort/FCKeditor/_samples/html/sample07.html
Normal file
@ -0,0 +1,55 @@
|
||||
<!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)
|
||||
-->
|
||||
<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>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - JavaScript - Sample 7</h1>
|
||||
<div>
|
||||
In this sample the user can edit the complete page contents and header (from <HTML>
|
||||
to </HTML>).
|
||||
</div>
|
||||
<hr />
|
||||
<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')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.Config['FullPage'] = true ;
|
||||
oFCKeditor.Value = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Full Page Test</title><meta content="text/html; charset=utf-8" http-equiv="Content-Type"/></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>
|
192
standort/FCKeditor/_samples/html/sample08.html
Normal file
192
standort/FCKeditor/_samples/html/sample08.html
Normal file
@ -0,0 +1,192 @@
|
||||
<!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)
|
||||
-->
|
||||
<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">
|
||||
|
||||
// FCKeditor_OnComplete is a special function that is called when an editor
|
||||
// instance is loaded ad available to the API. It must be named exactly in
|
||||
// this way.
|
||||
function FCKeditor_OnComplete( editorInstance )
|
||||
{
|
||||
// Show the editor name and description in the browser status bar.
|
||||
document.getElementById('eMessage').innerHTML = 'Instance "' + editorInstance.Name + '" loaded - ' + editorInstance.Description ;
|
||||
|
||||
// Show this sample buttons.
|
||||
document.getElementById('eButtons').style.visibility = '' ;
|
||||
}
|
||||
|
||||
function InsertHTML()
|
||||
{
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
|
||||
|
||||
// Check the active editing mode.
|
||||
if ( oEditor.EditMode == FCK_EDITMODE_WYSIWYG )
|
||||
{
|
||||
// Insert the desired HTML.
|
||||
oEditor.InsertHtml( '- This is some <a href="/Test1.html">sample</a> HTML -' ) ;
|
||||
}
|
||||
else
|
||||
alert( 'You must be on WYSIWYG mode!' ) ;
|
||||
}
|
||||
|
||||
function SetContents()
|
||||
{
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
|
||||
|
||||
// Set the editor contents (replace the actual one).
|
||||
oEditor.SetHTML( 'This is the <b>new content</b> I want in the editor.' ) ;
|
||||
}
|
||||
|
||||
function GetContents()
|
||||
{
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
|
||||
|
||||
// Get the editor contents in XHTML.
|
||||
alert( oEditor.GetXHTML( true ) ) ; // "true" means you want it formatted.
|
||||
}
|
||||
|
||||
function ExecuteCommand( commandName )
|
||||
{
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
|
||||
|
||||
// Execute the command.
|
||||
oEditor.Commands.GetCommand( commandName ).Execute() ;
|
||||
}
|
||||
|
||||
function GetLength()
|
||||
{
|
||||
// This functions shows that you can interact directly with the editor area
|
||||
// DOM. In this way you have the freedom to do anything you want with it.
|
||||
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
|
||||
|
||||
// Get the Editor Area DOM (Document object).
|
||||
var oDOM = oEditor.EditorDocument ;
|
||||
|
||||
var iLength ;
|
||||
|
||||
// The are two diffent ways to get the text (without HTML markups).
|
||||
// It is browser specific.
|
||||
|
||||
if ( document.all ) // If Internet Explorer.
|
||||
{
|
||||
iLength = oDOM.body.innerText.length ;
|
||||
}
|
||||
else // If Gecko.
|
||||
{
|
||||
var r = oDOM.createRange() ;
|
||||
r.selectNodeContents( oDOM.body ) ;
|
||||
iLength = r.toString().length ;
|
||||
}
|
||||
|
||||
alert( 'Actual text length (without HTML markups): ' + iLength + ' characters' ) ;
|
||||
}
|
||||
|
||||
function GetInnerHTML()
|
||||
{
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
|
||||
|
||||
alert( oEditor.EditorDocument.body.innerHTML ) ;
|
||||
}
|
||||
|
||||
function CheckIsDirty()
|
||||
{
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
|
||||
alert( oEditor.IsDirty() ) ;
|
||||
}
|
||||
|
||||
function ResetIsDirty()
|
||||
{
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
|
||||
oEditor.ResetIsDirty() ;
|
||||
alert( 'The "IsDirty" status has been reset' ) ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - JavaScript - Sample 8
|
||||
</h1>
|
||||
<div>
|
||||
This sample shows how to use the FCKeditor JavaScript API to interact with the editor
|
||||
at runtime.
|
||||
</div>
|
||||
<hr />
|
||||
<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')) ;
|
||||
|
||||
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>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
<hr />
|
||||
<div id="eMessage">
|
||||
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
<div id="eButtons" style="visibility: hidden">
|
||||
<input type="button" value="Insert HTML" onclick="InsertHTML();" />
|
||||
<input type="button" value="Set Editor Contents" onclick="SetContents();" />
|
||||
<input type="button" value="Get Editor Contents (XHTML)" onclick="GetContents();" />
|
||||
<br />
|
||||
<br />
|
||||
<input type="button" value='Execute "Bold" Command' onclick="ExecuteCommand('Bold');" />
|
||||
<input type="button" value='Execute "Link" Command' onclick="ExecuteCommand('Link');" />
|
||||
<br />
|
||||
<br />
|
||||
<input type="button" value="Interact with the Editor Area DOM" onclick="GetLength();" />
|
||||
<input type="button" value="Get innerHTML" onclick="GetInnerHTML();" />
|
||||
<br />
|
||||
<br />
|
||||
<input type="button" value="Check IsDirty()" onclick="CheckIsDirty();" />
|
||||
<input type="button" value="Reset IsDirty()" onclick="ResetIsDirty();" />
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
96
standort/FCKeditor/_samples/html/sample09.html
Normal file
96
standort/FCKeditor/_samples/html/sample09.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!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)
|
||||
-->
|
||||
<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 FCKeditor_OnComplete( editorInstance )
|
||||
{
|
||||
editorInstance.Events.AttachEvent( 'OnBlur' , FCKeditor_OnBlur ) ;
|
||||
editorInstance.Events.AttachEvent( 'OnFocus', FCKeditor_OnFocus ) ;
|
||||
}
|
||||
|
||||
function FCKeditor_OnBlur( editorInstance )
|
||||
{
|
||||
editorInstance.ToolbarSet.Collapse() ;
|
||||
}
|
||||
|
||||
function FCKeditor_OnFocus( editorInstance )
|
||||
{
|
||||
editorInstance.ToolbarSet.Expand() ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - JavaScript - Sample 9</h1>
|
||||
<div>
|
||||
This sample shows FCKeditor in a more complex form with two different instances.<br />
|
||||
It also shows and interesting usage of the "OnFocus" and "OnBlur" events available
|
||||
in the JavaScript API.
|
||||
</div>
|
||||
<hr />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
Normal text field:<br />
|
||||
<input name="NormaText" value="Plain Text" />
|
||||
<br />
|
||||
<br />
|
||||
FCKeditor with Basic toolbar:
|
||||
<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')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor_Basic' ) ;
|
||||
|
||||
oFCKeditor.Config['ToolbarStartExpanded'] = false ;
|
||||
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.ToolbarSet = 'Basic' ;
|
||||
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
<br />
|
||||
FCKeditor with Default toolbar:
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
oFCKeditor = new FCKeditor( 'FCKeditor_Default' ) ;
|
||||
|
||||
oFCKeditor.Config['ToolbarStartExpanded'] = false ;
|
||||
|
||||
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>
|
75
standort/FCKeditor/_samples/html/sample10.html
Normal file
75
standort/FCKeditor/_samples/html/sample10.html
Normal file
@ -0,0 +1,75 @@
|
||||
<!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)
|
||||
-->
|
||||
<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>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - JavaScript - Sample 10</h1>
|
||||
<div>
|
||||
This sample shows a form with two FCKeditor instance. Both instances share the same
|
||||
toolbar, available in the top.
|
||||
</div>
|
||||
<hr />
|
||||
<div id="xToolbar"></div>
|
||||
<hr />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
Normal text field:<br />
|
||||
<input name="NormaText" value="Plain Text" />
|
||||
<br />
|
||||
<br />
|
||||
FCKeditor 1:
|
||||
<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')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor_1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.Height = 100 ;
|
||||
oFCKeditor.Config[ 'ToolbarLocation' ] = 'Out:xToolbar' ;
|
||||
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
<br />
|
||||
FCKeditor 2:
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
oFCKeditor = new FCKeditor( 'FCKeditor_2' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.Height = 100 ;
|
||||
oFCKeditor.Config[ 'ToolbarLocation' ] = 'Out:xToolbar' ;
|
||||
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>
|
39
standort/FCKeditor/_samples/html/sample11.html
Normal file
39
standort/FCKeditor/_samples/html/sample11.html
Normal file
@ -0,0 +1,39 @@
|
||||
<!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)
|
||||
-->
|
||||
<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" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - JavaScript - Sample 11</h1>
|
||||
<div>
|
||||
This sample shows a form with two FCKeditor instance loaded inside an IFRAME. Both instances share the same
|
||||
toolbar, available in the main page (top).
|
||||
</div>
|
||||
<hr />
|
||||
<div id="xToolbar"></div>
|
||||
<hr />
|
||||
<iframe src="sample11_frame.html" width="100%" height="300"></iframe>
|
||||
</body>
|
||||
</html>
|
65
standort/FCKeditor/_samples/html/sample11_frame.html
Normal file
65
standort/FCKeditor/_samples/html/sample11_frame.html
Normal file
@ -0,0 +1,65 @@
|
||||
<!--
|
||||
* 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)
|
||||
-->
|
||||
<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>
|
||||
</head>
|
||||
<body>
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
Normal text field:<br />
|
||||
<input name="NormaText" value="Plain Text" />
|
||||
<br />
|
||||
<br />
|
||||
FCKeditor 1:
|
||||
<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')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor_1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.Height = 100 ;
|
||||
oFCKeditor.Config[ 'ToolbarLocation' ] = 'Out:parent(xToolbar)' ;
|
||||
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
<br />
|
||||
FCKeditor 2:
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
oFCKeditor = new FCKeditor( 'FCKeditor_2' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.Height = 100 ;
|
||||
oFCKeditor.Config[ 'ToolbarLocation' ] = 'Out:parent(xToolbar)' ;
|
||||
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>
|
68
standort/FCKeditor/_samples/html/sampleposteddata.asp
Normal file
68
standort/FCKeditor/_samples/html/sampleposteddata.asp
Normal file
@ -0,0 +1,68 @@
|
||||
<!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="../sample.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 </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
|
||||
|
||||
%>
|
76
standort/FCKeditor/_samples/html/sampleposteddata.html
Normal file
76
standort/FCKeditor/_samples/html/sampleposteddata.html
Normal file
@ -0,0 +1,76 @@
|
||||
<!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)
|
||||
-->
|
||||
<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="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - Samples - Posted Data
|
||||
</h1>
|
||||
<div>
|
||||
This page lists all data posted by the form. It uses the "QueryString" to search
|
||||
for data submitted using the "GET" method, so it is limited to 2KB.
|
||||
</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</td>
|
||||
<td>
|
||||
Value</td>
|
||||
</tr>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
function HTMLEncode( text )
|
||||
{
|
||||
text = text.replace(/&/g, "&") ;
|
||||
text = text.replace(/"/g, """) ;
|
||||
text = text.replace(/</g, "<") ;
|
||||
text = text.replace(/>/g, ">") ;
|
||||
text = text.replace(/'/g, "'") ;
|
||||
|
||||
return text ;
|
||||
}
|
||||
|
||||
var aParams = document.location.search.substr(1).split('&') ;
|
||||
|
||||
for ( i = 0 ; i < aParams.length ; i++ )
|
||||
{
|
||||
var aParam = aParams[i].split('=') ;
|
||||
var sParamName = aParam[0] ;
|
||||
var sParamValue = aParam[1] ;
|
||||
|
||||
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( '</tr>' ) ;
|
||||
}
|
||||
|
||||
//-->
|
||||
</script>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
51
standort/FCKeditor/_samples/lasso/sample01.lasso
Normal file
51
standort/FCKeditor/_samples/lasso/sample01.lasso
Normal file
@ -0,0 +1,51 @@
|
||||
[//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)
|
||||
*/
|
||||
]
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<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="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Lasso - Sample 1</h1>
|
||||
This sample displays a normal HTML form with an FCKeditor with full features
|
||||
enabled.
|
||||
<hr>
|
||||
<form action="sampleposteddata.lasso" method="post" target="_blank">
|
||||
[//lasso
|
||||
include('../../fckeditor.lasso');
|
||||
var('basepath') = response_filepath->split('_samples')->get(1);
|
||||
|
||||
var('myeditor') = fck_editor(
|
||||
-instancename='FCKeditor1',
|
||||
-basepath=$basepath,
|
||||
-initialvalue='This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.'
|
||||
);
|
||||
|
||||
$myeditor->create;
|
||||
]
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
105
standort/FCKeditor/_samples/lasso/sample02.lasso
Normal file
105
standort/FCKeditor/_samples/lasso/sample02.lasso
Normal file
@ -0,0 +1,105 @@
|
||||
[//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)
|
||||
*/
|
||||
]
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<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="../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 - Lasso - 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:
|
||||
</td>
|
||||
<td>
|
||||
<select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<form action="sampleposteddata.lasso" method="post" target="_blank">
|
||||
[//lasso
|
||||
include('../../fckeditor.lasso');
|
||||
var('basepath') = response_filepath->split('_samples')->get(1);
|
||||
|
||||
if(action_param('Lang'));
|
||||
var('config') = array(
|
||||
'AutoDetectLanguage' = 'false',
|
||||
'DefaultLanguage' = action_param('Lang')
|
||||
);
|
||||
else;
|
||||
var('config') = array(
|
||||
'AutoDetectLanguage' = 'true',
|
||||
'DefaultLanguage' = 'en'
|
||||
);
|
||||
/if;
|
||||
|
||||
var('myeditor') = fck_editor(
|
||||
-instancename='FCKeditor1',
|
||||
-basepath=$basepath,
|
||||
-config=$config,
|
||||
-initialvalue='This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.'
|
||||
);
|
||||
|
||||
$myeditor->create;
|
||||
]
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
83
standort/FCKeditor/_samples/lasso/sample03.lasso
Normal file
83
standort/FCKeditor/_samples/lasso/sample03.lasso
Normal file
@ -0,0 +1,83 @@
|
||||
[//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)
|
||||
*/
|
||||
]
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<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="../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 - Lasso - 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:
|
||||
</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.lasso" method="post" target="_blank">
|
||||
[//lasso
|
||||
include('../../fckeditor.lasso');
|
||||
var('basepath') = response_filepath->split('_samples')->get(1);
|
||||
|
||||
var('myeditor') = fck_editor(
|
||||
-instancename='FCKeditor1',
|
||||
-basepath=$basepath,
|
||||
-initialvalue='This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.'
|
||||
);
|
||||
|
||||
if(action_param('Toolbar'));
|
||||
$myeditor->toolbarset = action_param('Toolbar');
|
||||
/if;
|
||||
|
||||
$myeditor->create;
|
||||
]
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
89
standort/FCKeditor/_samples/lasso/sample04.lasso
Normal file
89
standort/FCKeditor/_samples/lasso/sample04.lasso
Normal file
@ -0,0 +1,89 @@
|
||||
[//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)
|
||||
*/
|
||||
]
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<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="../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 - Lasso - 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:
|
||||
</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.lasso" method="post" target="_blank">
|
||||
[//lasso
|
||||
include('../../fckeditor.lasso');
|
||||
var('basepath') = response_filepath->split('_samples')->get(1);
|
||||
|
||||
var('myeditor') = fck_editor(
|
||||
-instancename='FCKeditor1',
|
||||
-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>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
47
standort/FCKeditor/_samples/lasso/sampleposteddata.lasso
Normal file
47
standort/FCKeditor/_samples/lasso/sampleposteddata.lasso
Normal file
@ -0,0 +1,47 @@
|
||||
[//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)
|
||||
*/
|
||||
]
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<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="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Samples - Posted Data</h1>
|
||||
This page lists all data posted by the form.
|
||||
<hr>
|
||||
<table width="100%" border="1" cellspacing="0" bordercolor="#999999">
|
||||
<tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
|
||||
<td nowrap>Field Name </td>
|
||||
<td>Value</td>
|
||||
</tr>
|
||||
[iterate(client_postparams, local('this'))]
|
||||
<tr>
|
||||
<td valign="top" nowrap><b>[#this->first]</b></td>
|
||||
<td width="100%">[#this->second]</td>
|
||||
</tr>
|
||||
[/iterate]
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
111
standort/FCKeditor/_samples/perl/sample01.cgi
Normal file
111
standort/FCKeditor/_samples/perl/sample01.cgi
Normal file
@ -0,0 +1,111 @@
|
||||
#!/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)
|
||||
#####
|
||||
|
||||
## START: Hack for Windows (Not important to understand the editor code... Perl specific).
|
||||
if(Windows_check()) {
|
||||
chdir(GetScriptPath($0));
|
||||
}
|
||||
|
||||
sub Windows_check
|
||||
{
|
||||
# IIS,PWS(NT/95)
|
||||
$www_server_os = $^O;
|
||||
# Win98 & NT(SP4)
|
||||
if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; }
|
||||
# AnHTTPd/Omni/IIS
|
||||
if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; }
|
||||
# Win Apache
|
||||
if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; }
|
||||
if($www_server_os=~ /win/i) { return(1); }
|
||||
return(0);
|
||||
}
|
||||
|
||||
sub GetScriptPath {
|
||||
local($path) = @_;
|
||||
if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; }
|
||||
$path;
|
||||
}
|
||||
## END: Hack for IIS
|
||||
|
||||
require '../../fckeditor.pl';
|
||||
|
||||
# When $ENV{'PATH_INFO'} cannot be used by perl.
|
||||
# $DefRootPath = "/XXXXX/_samples/perl/sample01.cgi"; Please write in script.
|
||||
|
||||
my $DefServerPath = "";
|
||||
my $ServerPath;
|
||||
|
||||
$ServerPath = &GetServerPath();
|
||||
print "Content-type: text/html\n\n";
|
||||
print <<"_HTML_TAG_";
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<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="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Perl - Sample 1</h1>
|
||||
This sample displays a normal HTML form with an FCKeditor with full features
|
||||
enabled.
|
||||
<hr>
|
||||
<form action="sampleposteddata.cgi" method="post" target="_blank">
|
||||
_HTML_TAG_
|
||||
|
||||
#// 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.
|
||||
|
||||
$sBasePath = $ServerPath;
|
||||
$sBasePath = substr($sBasePath,0,index($sBasePath,"_samples"));
|
||||
&FCKeditor('FCKeditor1');
|
||||
$BasePath = $sBasePath;
|
||||
$Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.';
|
||||
&Create();
|
||||
|
||||
print <<"_HTML_TAG_";
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
_HTML_TAG_
|
||||
|
||||
################
|
||||
#Please use this function, rewriting it depending on a server's environment.
|
||||
################
|
||||
sub GetServerPath
|
||||
{
|
||||
my $dir;
|
||||
|
||||
if($DefServerPath) {
|
||||
$dir = $DefServerPath;
|
||||
} else {
|
||||
if($ENV{'PATH_INFO'}) {
|
||||
$dir = $ENV{'PATH_INFO'};
|
||||
} elsif($ENV{'FILEPATH_INFO'}) {
|
||||
$dir = $ENV{'FILEPATH_INFO'};
|
||||
}
|
||||
}
|
||||
return($dir);
|
||||
}
|
176
standort/FCKeditor/_samples/perl/sample02.cgi
Normal file
176
standort/FCKeditor/_samples/perl/sample02.cgi
Normal file
@ -0,0 +1,176 @@
|
||||
#!/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)
|
||||
#####
|
||||
|
||||
## START: Hack for Windows (Not important to understand the editor code... Perl specific).
|
||||
if(Windows_check()) {
|
||||
chdir(GetScriptPath($0));
|
||||
}
|
||||
|
||||
sub Windows_check
|
||||
{
|
||||
# IIS,PWS(NT/95)
|
||||
$www_server_os = $^O;
|
||||
# Win98 & NT(SP4)
|
||||
if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; }
|
||||
# AnHTTPd/Omni/IIS
|
||||
if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; }
|
||||
# Win Apache
|
||||
if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; }
|
||||
if($www_server_os=~ /win/i) { return(1); }
|
||||
return(0);
|
||||
}
|
||||
|
||||
sub GetScriptPath {
|
||||
local($path) = @_;
|
||||
if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; }
|
||||
$path;
|
||||
}
|
||||
## END: Hack for IIS
|
||||
|
||||
require '../../fckeditor.pl';
|
||||
|
||||
# When $ENV{'PATH_INFO'} cannot be used by perl.
|
||||
# $DefRootPath = "/XXXXX/_samples/perl/sample02.cgi"; Please write in script.
|
||||
|
||||
my $DefServerPath = "";
|
||||
my $ServerPath;
|
||||
|
||||
$ServerPath = &GetServerPath();
|
||||
|
||||
if($ENV{'REQUEST_METHOD'} eq "POST") {
|
||||
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
|
||||
} else {
|
||||
$buffer = $ENV{'QUERY_STRING'};
|
||||
}
|
||||
@pairs = split(/&/,$buffer);
|
||||
foreach $pair (@pairs) {
|
||||
($name,$value) = split(/=/,$pair);
|
||||
$value =~ tr/+/ /;
|
||||
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
|
||||
$value =~ s/\t//g;
|
||||
$value =~ s/\r\n/\n/g;
|
||||
$FORM{$name} .= "\0" if(defined($FORM{$name}));
|
||||
$FORM{$name} .= $value;
|
||||
}
|
||||
|
||||
print "Content-type: text/html\n\n";
|
||||
print <<"_HTML_TAG_";
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<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="../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 - Perl - 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:
|
||||
</td>
|
||||
<td>
|
||||
<select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<form action="sampleposteddata.cgi" method="post" target="_blank">
|
||||
_HTML_TAG_
|
||||
|
||||
#// 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.
|
||||
$sBasePath = $ServerPath;
|
||||
$sBasePath = substr( $sBasePath, 0, index($sBasePath,"_samples"));
|
||||
|
||||
&FCKeditor('FCKeditor1');
|
||||
$BasePath = $sBasePath;
|
||||
|
||||
if($FORM{'Lang'} ne "") {
|
||||
$Config{'AutoDetectLanguage'} = "false";
|
||||
$Config{'DefaultLanguage'} = $FORM{'Lang'};
|
||||
} else {
|
||||
$Config{'AutoDetectLanguage'} = "true";
|
||||
$Config{'DefaultLanguage'} = 'en' ;
|
||||
}
|
||||
$Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
&Create();
|
||||
|
||||
print <<"_HTML_TAG_";
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
_HTML_TAG_
|
||||
|
||||
################
|
||||
#Please use this function, rewriting it depending on a server's environment.
|
||||
################
|
||||
sub GetServerPath
|
||||
{
|
||||
my $dir;
|
||||
|
||||
if($DefServerPath) {
|
||||
$dir = $DefServerPath;
|
||||
} else {
|
||||
if($ENV{'PATH_INFO'}) {
|
||||
$dir = $ENV{'PATH_INFO'};
|
||||
} elsif($ENV{'FILEPATH_INFO'}) {
|
||||
$dir = $ENV{'FILEPATH_INFO'};
|
||||
}
|
||||
}
|
||||
return($dir);
|
||||
}
|
161
standort/FCKeditor/_samples/perl/sample03.cgi
Normal file
161
standort/FCKeditor/_samples/perl/sample03.cgi
Normal file
@ -0,0 +1,161 @@
|
||||
#!/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)
|
||||
#####
|
||||
|
||||
## START: Hack for Windows (Not important to understand the editor code... Perl specific).
|
||||
if(Windows_check()) {
|
||||
chdir(GetScriptPath($0));
|
||||
}
|
||||
|
||||
sub Windows_check
|
||||
{
|
||||
# IIS,PWS(NT/95)
|
||||
$www_server_os = $^O;
|
||||
# Win98 & NT(SP4)
|
||||
if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; }
|
||||
# AnHTTPd/Omni/IIS
|
||||
if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; }
|
||||
# Win Apache
|
||||
if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; }
|
||||
if($www_server_os=~ /win/i) { return(1); }
|
||||
return(0);
|
||||
}
|
||||
|
||||
sub GetScriptPath {
|
||||
local($path) = @_;
|
||||
if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; }
|
||||
$path;
|
||||
}
|
||||
## END: Hack for IIS
|
||||
|
||||
require '../../fckeditor.pl';
|
||||
|
||||
# When $ENV{'PATH_INFO'} cannot be used by perl.
|
||||
# $DefRootPath = "/XXXXX/_samples/perl/sample03.cgi"; Please write in script.
|
||||
|
||||
my $DefServerPath = "";
|
||||
my $ServerPath;
|
||||
|
||||
$ServerPath = &GetServerPath();
|
||||
|
||||
if($ENV{'REQUEST_METHOD'} eq "POST") {
|
||||
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
|
||||
} else {
|
||||
$buffer = $ENV{'QUERY_STRING'};
|
||||
}
|
||||
@pairs = split(/&/,$buffer);
|
||||
foreach $pair (@pairs) {
|
||||
($name,$value) = split(/=/,$pair);
|
||||
$value =~ tr/+/ /;
|
||||
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
|
||||
$value =~ s/\t//g;
|
||||
$value =~ s/\r\n/\n/g;
|
||||
$FORM{$name} .= "\0" if(defined($FORM{$name}));
|
||||
$FORM{$name} .= $value;
|
||||
}
|
||||
|
||||
print "Content-type: text/html\n\n";
|
||||
print <<"_HTML_TAG_";
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<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="../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 - Perl - 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:
|
||||
</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.cgi" method="post" target="_blank">
|
||||
_HTML_TAG_
|
||||
|
||||
#// 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.
|
||||
|
||||
$sBasePath = $ServerPath;
|
||||
$sBasePath = substr($sBasePath, 0, index( $sBasePath, "_samples" ));
|
||||
|
||||
&FCKeditor('FCKeditor1') ;
|
||||
$BasePath = $sBasePath ;
|
||||
|
||||
if($FORM{'Toolbar'} ne "") {
|
||||
$ToolbarSet = &specialchar_cnv( $FORM{'Toolbar'} );
|
||||
}
|
||||
$Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
&Create();
|
||||
|
||||
print <<"_HTML_TAG_";
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
_HTML_TAG_
|
||||
|
||||
################
|
||||
#Please use this function, rewriting it depending on a server's environment.
|
||||
################
|
||||
sub GetServerPath
|
||||
{
|
||||
my $dir;
|
||||
|
||||
if($DefServerPath) {
|
||||
$dir = $DefServerPath;
|
||||
} else {
|
||||
if($ENV{'PATH_INFO'}) {
|
||||
$dir = $ENV{'PATH_INFO'};
|
||||
} elsif($ENV{'FILEPATH_INFO'}) {
|
||||
$dir = $ENV{'FILEPATH_INFO'};
|
||||
}
|
||||
}
|
||||
return($dir);
|
||||
}
|
168
standort/FCKeditor/_samples/perl/sample04.cgi
Normal file
168
standort/FCKeditor/_samples/perl/sample04.cgi
Normal file
@ -0,0 +1,168 @@
|
||||
#!/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)
|
||||
#####
|
||||
|
||||
## START: Hack for Windows (Not important to understand the editor code... Perl specific).
|
||||
if(Windows_check()) {
|
||||
chdir(GetScriptPath($0));
|
||||
}
|
||||
|
||||
sub Windows_check
|
||||
{
|
||||
# IIS,PWS(NT/95)
|
||||
$www_server_os = $^O;
|
||||
# Win98 & NT(SP4)
|
||||
if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; }
|
||||
# AnHTTPd/Omni/IIS
|
||||
if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; }
|
||||
# Win Apache
|
||||
if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; }
|
||||
if($www_server_os=~ /win/i) { return(1); }
|
||||
return(0);
|
||||
}
|
||||
|
||||
sub GetScriptPath {
|
||||
local($path) = @_;
|
||||
if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; }
|
||||
$path;
|
||||
}
|
||||
## END: Hack for IIS
|
||||
|
||||
require '../../fckeditor.pl';
|
||||
|
||||
# When $ENV{'PATH_INFO'} cannot be used by perl.
|
||||
# $DefRootPath = "/XXXXX/_samples/perl/sample04.cgi"; Please write in script.
|
||||
|
||||
my $DefServerPath = "";
|
||||
my $ServerPath;
|
||||
|
||||
$ServerPath = &GetServerPath();
|
||||
|
||||
if($ENV{'REQUEST_METHOD'} eq "POST") {
|
||||
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
|
||||
} else {
|
||||
$buffer = $ENV{'QUERY_STRING'};
|
||||
}
|
||||
@pairs = split(/&/,$buffer);
|
||||
foreach $pair (@pairs) {
|
||||
($name,$value) = split(/=/,$pair);
|
||||
$value =~ tr/+/ /;
|
||||
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
|
||||
$value =~ s/\t//g;
|
||||
$value =~ s/\r\n/\n/g;
|
||||
$FORM{$name} .= "\0" if(defined($FORM{$name}));
|
||||
$FORM{$name} .= $value;
|
||||
}
|
||||
|
||||
#!!Caution javascript \ Quart
|
||||
|
||||
print "Content-type: text/html\n\n";
|
||||
print <<"_HTML_TAG_";
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<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="../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 - Perl - 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:
|
||||
</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.cgi" method="post" target="_blank">
|
||||
_HTML_TAG_
|
||||
|
||||
#// 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.
|
||||
$sBasePath = $ServerPath;
|
||||
$sBasePath = substr( $sBasePath, 0, index( $sBasePath, "_samples" ) ) ;
|
||||
|
||||
&FCKeditor('FCKeditor1');
|
||||
$BasePath = $sBasePath;
|
||||
|
||||
if($FORM{'Skin'} ne "") {
|
||||
$Config{'SkinPath'} = $sBasePath . 'editor/skins/' . &specialchar_cnv( $FORM{'Skin'} ) . '/' ;
|
||||
}
|
||||
$Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
&Create() ;
|
||||
|
||||
print <<"_HTML_TAG_";
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
_HTML_TAG_
|
||||
|
||||
################
|
||||
#Please use this function, rewriting it depending on a server's environment.
|
||||
################
|
||||
sub GetServerPath
|
||||
{
|
||||
my $dir;
|
||||
|
||||
if($DefServerPath) {
|
||||
$dir = $DefServerPath;
|
||||
} else {
|
||||
if($ENV{'PATH_INFO'}) {
|
||||
$dir = $ENV{'PATH_INFO'};
|
||||
} elsif($ENV{'FILEPATH_INFO'}) {
|
||||
$dir = $ENV{'FILEPATH_INFO'};
|
||||
}
|
||||
}
|
||||
return($dir);
|
||||
}
|
101
standort/FCKeditor/_samples/perl/sampleposteddata.cgi
Normal file
101
standort/FCKeditor/_samples/perl/sampleposteddata.cgi
Normal file
@ -0,0 +1,101 @@
|
||||
#!/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)
|
||||
#####
|
||||
|
||||
## START: Hack for Windows (Not important to understand the editor code... Perl specific).
|
||||
if(Windows_check()) {
|
||||
chdir(GetScriptPath($0));
|
||||
}
|
||||
|
||||
sub Windows_check
|
||||
{
|
||||
# IIS,PWS(NT/95)
|
||||
$www_server_os = $^O;
|
||||
# Win98 & NT(SP4)
|
||||
if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; }
|
||||
# AnHTTPd/Omni/IIS
|
||||
if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; }
|
||||
# Win Apache
|
||||
if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; }
|
||||
if($www_server_os=~ /win/i) { return(1); }
|
||||
return(0);
|
||||
}
|
||||
|
||||
sub GetScriptPath {
|
||||
local($path) = @_;
|
||||
if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; }
|
||||
$path;
|
||||
}
|
||||
## END: Hack for IIS
|
||||
|
||||
require '../../fckeditor.pl';
|
||||
|
||||
if($ENV{'REQUEST_METHOD'} eq "POST") {
|
||||
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
|
||||
} else {
|
||||
$buffer = $ENV{'QUERY_STRING'};
|
||||
}
|
||||
@pairs = split(/&/,$buffer);
|
||||
foreach $pair (@pairs) {
|
||||
($name,$value) = split(/=/,$pair);
|
||||
$value =~ tr/+/ /;
|
||||
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
|
||||
$value =~ s/\t//g;
|
||||
$value =~ s/\r\n/\n/g;
|
||||
$FORM{$name} .= "\0" if(defined($FORM{$name}));
|
||||
$FORM{$name} .= $value;
|
||||
}
|
||||
|
||||
print "Content-type: text/html\n\n";
|
||||
print <<"_HTML_TAG_";
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<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="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Samples - Posted Data</h1>
|
||||
This page lists all data posted by the form.
|
||||
<hr>
|
||||
<table width="100%" border="1" cellspacing="0" bordercolor="#999999">
|
||||
<tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
|
||||
<td nowrap>Field Name </td>
|
||||
<td>Value</td>
|
||||
</tr>
|
||||
_HTML_TAG_
|
||||
|
||||
foreach $key (keys %FORM) {
|
||||
$postedValue = &specialchar_cnv($FORM{$key});
|
||||
print <<"_HTML_TAG_";
|
||||
<tr>
|
||||
<td valign="top" nowrap><b>$key</b></td>
|
||||
<td width="100%">$postedValue</td>
|
||||
</tr>
|
||||
_HTML_TAG_
|
||||
}
|
||||
print <<"_HTML_TAG_";
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
_HTML_TAG_
|
53
standort/FCKeditor/_samples/php/sample01.php
Normal file
53
standort/FCKeditor/_samples/php/sample01.php
Normal file
@ -0,0 +1,53 @@
|
||||
<?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)
|
||||
*/
|
||||
|
||||
include("../../fckeditor.php") ;
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<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="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - PHP - Sample 1</h1>
|
||||
This sample displays a normal HTML form with an FCKeditor with full features
|
||||
enabled.
|
||||
<hr>
|
||||
<form action="sampleposteddata.php" method="post" target="_blank">
|
||||
<?php
|
||||
// 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.
|
||||
$sBasePath = $_SERVER['PHP_SELF'] ;
|
||||
$sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ;
|
||||
|
||||
$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() ;
|
||||
?>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
104
standort/FCKeditor/_samples/php/sample02.php
Normal file
104
standort/FCKeditor/_samples/php/sample02.php
Normal file
@ -0,0 +1,104 @@
|
||||
<?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)
|
||||
*/
|
||||
|
||||
include("../../fckeditor.php") ;
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<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="../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 - PHP - 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:
|
||||
</td>
|
||||
<td>
|
||||
<select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<form action="sampleposteddata.php" method="post" target="_blank">
|
||||
<?php
|
||||
// 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.
|
||||
$sBasePath = $_SERVER['PHP_SELF'] ;
|
||||
$sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ;
|
||||
|
||||
$oFCKeditor = new FCKeditor('FCKeditor1') ;
|
||||
$oFCKeditor->BasePath = $sBasePath ;
|
||||
|
||||
if ( isset($_GET['Lang']) )
|
||||
{
|
||||
$oFCKeditor->Config['AutoDetectLanguage'] = false ;
|
||||
$oFCKeditor->Config['DefaultLanguage'] = $_GET['Lang'] ;
|
||||
}
|
||||
else
|
||||
{
|
||||
$oFCKeditor->Config['AutoDetectLanguage'] = true ;
|
||||
$oFCKeditor->Config['DefaultLanguage'] = 'en' ;
|
||||
}
|
||||
|
||||
$oFCKeditor->Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
$oFCKeditor->Create() ;
|
||||
?> <br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
85
standort/FCKeditor/_samples/php/sample03.php
Normal file
85
standort/FCKeditor/_samples/php/sample03.php
Normal file
@ -0,0 +1,85 @@
|
||||
<?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)
|
||||
*/
|
||||
|
||||
include("../../fckeditor.php") ;
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<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="../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 - PHP - 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:
|
||||
</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.php" method="post" target="_blank">
|
||||
<?php
|
||||
// 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.
|
||||
$sBasePath = $_SERVER['PHP_SELF'] ;
|
||||
$sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ;
|
||||
|
||||
$oFCKeditor = new FCKeditor('FCKeditor1') ;
|
||||
$oFCKeditor->BasePath = $sBasePath ;
|
||||
|
||||
if ( isset($_GET['Toolbar']) )
|
||||
$oFCKeditor->ToolbarSet = htmlspecialchars($_GET['Toolbar']);
|
||||
|
||||
$oFCKeditor->Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
$oFCKeditor->Create() ;
|
||||
?>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
85
standort/FCKeditor/_samples/php/sample03a.php
Normal file
85
standort/FCKeditor/_samples/php/sample03a.php
Normal file
@ -0,0 +1,85 @@
|
||||
<?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)
|
||||
*/
|
||||
|
||||
include("../../fckeditor.php") ;
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<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="../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>Erfassung</h1>
|
||||
This sample shows how to change the editor toolbar.
|
||||
<hr>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
Text:
|
||||
</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.php" method="post" target="_blank">
|
||||
<?php
|
||||
// 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.
|
||||
$sBasePath = $_SERVER['PHP_SELF'] ;
|
||||
$sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ;
|
||||
|
||||
$oFCKeditor = new FCKeditor('FCKeditor1') ;
|
||||
$oFCKeditor->BasePath = $sBasePath ;
|
||||
|
||||
if ( isset($_GET['Toolbar']) )
|
||||
$oFCKeditor->ToolbarSet = htmlspecialchars($_GET['Toolbar']);
|
||||
|
||||
$oFCKeditor->Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
$oFCKeditor->Create() ;
|
||||
?>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
91
standort/FCKeditor/_samples/php/sample04.php
Normal file
91
standort/FCKeditor/_samples/php/sample04.php
Normal file
@ -0,0 +1,91 @@
|
||||
<?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)
|
||||
*/
|
||||
|
||||
include("../../fckeditor.php") ;
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<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="../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 - PHP - 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:
|
||||
</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.php" method="post" target="_blank">
|
||||
<?php
|
||||
// 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.
|
||||
$sBasePath = $_SERVER['PHP_SELF'] ;
|
||||
$sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ;
|
||||
|
||||
$oFCKeditor = new FCKeditor('FCKeditor1') ;
|
||||
$oFCKeditor->BasePath = $sBasePath ;
|
||||
|
||||
if ( isset($_GET['Skin']) )
|
||||
$oFCKeditor->Config['SkinPath'] = $sBasePath . 'editor/skins/' . htmlspecialchars($_GET['Skin']) . '/' ;
|
||||
|
||||
$oFCKeditor->Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
$oFCKeditor->Create() ;
|
||||
?>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
60
standort/FCKeditor/_samples/php/sampleposteddata.php
Normal file
60
standort/FCKeditor/_samples/php/sampleposteddata.php
Normal file
@ -0,0 +1,60 @@
|
||||
<?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)
|
||||
*/
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<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="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Samples - Posted Data</h1>
|
||||
This page lists all data posted by the form.
|
||||
<hr>
|
||||
<table width="100%" border="1" cellspacing="0" bordercolor="#999999">
|
||||
<tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
|
||||
<td nowrap>Field Name </td>
|
||||
<td>Value</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
if ( isset( $_POST ) )
|
||||
$postArray = &$_POST ; // 4.1.0 or later, use $_POST
|
||||
else
|
||||
$postArray = &$HTTP_POST_VARS ; // prior to 4.1.0, use HTTP_POST_VARS
|
||||
|
||||
foreach ( $postArray as $sForm => $value )
|
||||
{
|
||||
$postedValue = htmlspecialchars( stripslashes( $value ) ) ;
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td valign="top" nowrap><b><?=$sForm?></b></td>
|
||||
<td width="100%"><?=$postedValue?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
78
standort/FCKeditor/_samples/py/sample01.py
Normal file
78
standort/FCKeditor/_samples/py/sample01.py
Normal file
@ -0,0 +1,78 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
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.py
|
||||
Sample page.
|
||||
|
||||
File Authors:
|
||||
Andrew Liu (andrew@liuholdings.com)
|
||||
"""
|
||||
|
||||
import cgi
|
||||
import os
|
||||
|
||||
# Ensure that the fckeditor.py is included in your classpath
|
||||
import fckeditor
|
||||
|
||||
# Tell the browser to render html
|
||||
print "Content-Type: text/html"
|
||||
print ""
|
||||
|
||||
# Document header
|
||||
print """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<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="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Python - Sample 1</h1>
|
||||
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:
|
||||
sBasePath = os.environ.get("SCRIPT_NAME")
|
||||
sBasePath = sBasePath[0:sBasePath.find("_samples")]
|
||||
|
||||
oFCKeditor = fckeditor.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>."""
|
||||
print oFCKeditor.Create()
|
||||
except Exception, e:
|
||||
print e
|
||||
print """
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
"""
|
||||
|
||||
# For testing your environments
|
||||
print "<hr>"
|
||||
for key in os.environ.keys():
|
||||
print "%s: %s<br>" % (key, os.environ.get(key, ""))
|
||||
print "<hr>"
|
||||
|
||||
# Document footer
|
||||
print """
|
||||
</body>
|
||||
</html>
|
||||
"""
|
||||
|
||||
|
81
standort/FCKeditor/_samples/py/sampleposteddata.py
Normal file
81
standort/FCKeditor/_samples/py/sampleposteddata.py
Normal file
@ -0,0 +1,81 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
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.py
|
||||
This page lists the data posted by a form.
|
||||
|
||||
File Authors:
|
||||
Andrew Liu (andrew@liuholdings.com)
|
||||
"""
|
||||
|
||||
import cgi
|
||||
import os
|
||||
|
||||
# Tell the browser to render html
|
||||
print "Content-Type: text/html"
|
||||
print ""
|
||||
|
||||
try:
|
||||
# Create a cgi object
|
||||
form = cgi.FieldStorage()
|
||||
except Exception, e:
|
||||
print e
|
||||
|
||||
# Document header
|
||||
print """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<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="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
"""
|
||||
|
||||
# This is the real work
|
||||
print """
|
||||
<h1>FCKeditor - Samples - Posted Data</h1>
|
||||
This page lists all data posted by the form.
|
||||
<hr>
|
||||
<table width="100%" border="1" cellspacing="0" bordercolor="#999999">
|
||||
<tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
|
||||
<td nowrap>Field Name </td>
|
||||
<td>Value</td>
|
||||
</tr>
|
||||
"""
|
||||
for key in form.keys():
|
||||
try:
|
||||
value = form[key].value
|
||||
print """
|
||||
<tr>
|
||||
<td valign="top" nowrap><b>%s</b></td>
|
||||
<td width="100%%">%s</td>
|
||||
</tr>
|
||||
""" % (key, value)
|
||||
except Exception, e:
|
||||
print e
|
||||
print "</table>"
|
||||
|
||||
# For testing your environments
|
||||
print "<hr>"
|
||||
for key in os.environ.keys():
|
||||
print "%s: %s<br>" % (key, os.environ.get(key, ""))
|
||||
print "<hr>"
|
||||
|
||||
# Document footer
|
||||
print """
|
||||
</body>
|
||||
</html>
|
||||
"""
|
46
standort/FCKeditor/_samples/sample.css
Normal file
46
standort/FCKeditor/_samples/sample.css
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* 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)
|
||||
*/
|
||||
|
||||
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+ */
|
||||
}
|
89
standort/FCKeditor/_samples/sampleslist.html
Normal file
89
standort/FCKeditor/_samples/sampleslist.html
Normal file
@ -0,0 +1,89 @@
|
||||
<!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)
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>FCKeditor - Sample Selection</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">
|
||||
|
||||
if ( window.top == window )
|
||||
document.location = 'default.html' ;
|
||||
|
||||
function OpenSample( sample )
|
||||
{
|
||||
if ( sample.length > 0 )
|
||||
window.open( sample, 'Sample' ) ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body style="margin-top: 0px; margin-bottom: 0px;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" style="height: 100%">
|
||||
<tr>
|
||||
<td>
|
||||
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>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user