2
* FCKeditor - The text editor for internet
3
* Copyright (C) 2003-2005 Frederico Caldeira Knabben
5
* Licensed under the terms of the GNU Lesser General Public License:
6
* http://www.opensource.org/licenses/lgpl-license.php
8
* For further information visit:
9
* http://www.fckeditor.net/
11
* "Support Open Source software. What about a donation today?"
13
* File Name: sample05.html
17
* Frederico Caldeira Knabben (fredck@fckeditor.net)
19
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22
<title>FCKeditor - Sample</title>
23
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
24
<meta name="robots" content="noindex, nofollow">
25
<link href="../sample.css" rel="stylesheet" type="text/css" />
26
<script type="text/javascript" src="../../fckeditor.js"></script>
27
<script type="text/javascript">
29
function FCKeditor_OnComplete( editorInstance )
31
var oCombo = document.getElementById( 'cmbSkins' ) ;
33
// Get the active skin.
34
var sSkin = editorInstance.Config['SkinPath'] ;
35
sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
37
oCombo.value = sSkin ;
38
oCombo.style.visibility = '' ;
41
function ChangeLanguage( languageCode )
43
window.location.href = window.location.pathname + "?" + languageCode ;
49
<h1>FCKeditor - Javascript - Sample 5</h1>
50
This sample shows how to change the editor skin.
52
<table cellpadding="0" cellspacing="0" border="0">
55
Select the skin to load:
58
<select id="cmbSkins" onchange="ChangeLanguage(this.value);" style="VISIBILITY: hidden">
59
<option value="default" selected>Default</option>
60
<option value="office2003">Office 2003</option>
61
<option value="silver">Silver</option>
67
<form action="sampleposteddata.asp" method="post" target="_blank">
68
<script type="text/javascript">
70
// Automatically calculates the editor base path based on the _samples directory.
71
// This is usefull only for these samples. A real application should use something like this:
72
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
73
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('/_samples/')+1) ;
75
// Get the skin from the URL.
77
if ( document.location.search.length > 1 )
78
sSkin = document.location.search.substr(1) ;
80
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
81
oFCKeditor.BasePath = sBasePath ;
84
oFCKeditor.Config['SkinPath'] = sBasePath + 'editor/skins/' + sSkin + '/' ;
86
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
91
<input type="submit" value="Submit">
b'\\ No newline at end of file'