[763] | 1 | [//lasso
|
---|
| 2 | /*
|
---|
| 3 | * FCKeditor - The text editor for internet
|
---|
| 4 | * Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
---|
| 5 | *
|
---|
| 6 | * Licensed under the terms of the GNU Lesser General Public License:
|
---|
| 7 | * http://www.opensource.org/licenses/lgpl-license.php
|
---|
| 8 | *
|
---|
| 9 | * For further information visit:
|
---|
| 10 | * http://www.fckeditor.net/
|
---|
| 11 | *
|
---|
| 12 | * "Support Open Source software. What about a donation today?"
|
---|
| 13 | *
|
---|
| 14 | * File Name: sample04.lasso
|
---|
| 15 | * Sample page.
|
---|
| 16 | *
|
---|
| 17 | * File Authors:
|
---|
| 18 | * Jason Huck (jason.huck@corefive.com)
|
---|
| 19 | */
|
---|
| 20 | ]
|
---|
| 21 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
---|
| 22 | <html>
|
---|
| 23 | <head>
|
---|
| 24 | <title>FCKeditor - Sample</title>
|
---|
| 25 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
---|
| 26 | <meta name="robots" content="noindex, nofollow">
|
---|
| 27 | <link href="../sample.css" rel="stylesheet" type="text/css" />
|
---|
| 28 | <script type="text/javascript">
|
---|
| 29 | <!--
|
---|
| 30 | function FCKeditor_OnComplete( editorInstance )
|
---|
| 31 | {
|
---|
| 32 | var oCombo = document.getElementById( 'cmbSkins' ) ;
|
---|
| 33 |
|
---|
| 34 | // Get the active skin.
|
---|
| 35 | var sSkin = editorInstance.Config['SkinPath'] ;
|
---|
| 36 | sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
|
---|
| 37 |
|
---|
| 38 | oCombo.value = sSkin ;
|
---|
| 39 | oCombo.style.visibility = '' ;
|
---|
| 40 | }
|
---|
| 41 |
|
---|
| 42 | function ChangeSkin( skinName )
|
---|
| 43 | {
|
---|
| 44 | window.location.href = window.location.pathname + "?Skin=" + skinName ;
|
---|
| 45 | }
|
---|
| 46 | //-->
|
---|
| 47 | </script>
|
---|
| 48 | </head>
|
---|
| 49 | <body>
|
---|
| 50 | <h1>FCKeditor - Lasso - Sample 4</h1>
|
---|
| 51 | This sample shows how to change the editor skin.
|
---|
| 52 | <hr>
|
---|
| 53 | <table cellpadding="0" cellspacing="0" border="0">
|
---|
| 54 | <tr>
|
---|
| 55 | <td>
|
---|
| 56 | Select the skin to load:
|
---|
| 57 | </td>
|
---|
| 58 | <td>
|
---|
| 59 | <select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden">
|
---|
| 60 | <option value="default" selected>Default</option>
|
---|
| 61 | <option value="office2003">Office 2003</option>
|
---|
| 62 | <option value="silver">Silver</option>
|
---|
| 63 | </select>
|
---|
| 64 | </td>
|
---|
| 65 | </tr>
|
---|
| 66 | </table>
|
---|
| 67 | <br>
|
---|
| 68 | <form action="sampleposteddata.lasso" method="post" target="_blank">
|
---|
| 69 | [//lasso
|
---|
| 70 | include('../../fckeditor.lasso');
|
---|
| 71 | var('basepath') = response_filepath->split('_samples')->get(1);
|
---|
| 72 |
|
---|
| 73 | var('myeditor') = fck_editor(
|
---|
| 74 | -instancename='FCKeditor1',
|
---|
| 75 | -basepath=$basepath,
|
---|
| 76 | -initialvalue='This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.'
|
---|
| 77 | );
|
---|
| 78 |
|
---|
| 79 | if(action_param('Skin'));
|
---|
| 80 | $myeditor->config = array('SkinPath' = $basepath + 'editor/skins/' + action_param('Skin') + '/');
|
---|
| 81 | /if;
|
---|
| 82 |
|
---|
| 83 | $myeditor->create;
|
---|
| 84 | ]
|
---|
| 85 | <br>
|
---|
| 86 | <input type="submit" value="Submit">
|
---|
| 87 | </form>
|
---|
| 88 | </body>
|
---|
| 89 | </html>
|
---|