| 1075 |
ddelon |
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
|
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: fck_placeholder.html
|
|
|
15 |
* Placeholder Plugin.
|
|
|
16 |
*
|
|
|
17 |
* File Authors:
|
|
|
18 |
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
|
|
19 |
-->
|
|
|
20 |
<html>
|
|
|
21 |
<head>
|
|
|
22 |
<title>Placeholder Properties</title>
|
|
|
23 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
24 |
<meta content="noindex, nofollow" name="robots">
|
|
|
25 |
<script language="javascript">
|
|
|
26 |
|
|
|
27 |
var oEditor = window.parent.InnerDialogLoaded() ;
|
|
|
28 |
var FCKLang = oEditor.FCKLang ;
|
|
|
29 |
var FCKPlaceholders = oEditor.FCKPlaceholders ;
|
|
|
30 |
|
|
|
31 |
window.onload = function ()
|
|
|
32 |
{
|
|
|
33 |
// First of all, translate the dialog box texts
|
|
|
34 |
oEditor.FCKLanguageManager.TranslatePage( document ) ;
|
|
|
35 |
|
|
|
36 |
LoadSelected() ;
|
|
|
37 |
|
|
|
38 |
// Show the "Ok" button.
|
|
|
39 |
window.parent.SetOkButton( true ) ;
|
|
|
40 |
}
|
|
|
41 |
|
|
|
42 |
var eSelected = oEditor.FCKSelection.GetSelectedElement() ;
|
|
|
43 |
|
|
|
44 |
function LoadSelected()
|
|
|
45 |
{
|
|
|
46 |
if ( !eSelected )
|
|
|
47 |
return ;
|
|
|
48 |
|
|
|
49 |
if ( eSelected.tagName == 'SPAN' && eSelected._fckplaceholder )
|
|
|
50 |
document.getElementById('txtName').value = eSelected._fckplaceholder ;
|
|
|
51 |
else
|
|
|
52 |
eSelected == null ;
|
|
|
53 |
}
|
|
|
54 |
|
|
|
55 |
function Ok()
|
|
|
56 |
{
|
|
|
57 |
var sValue = document.getElementById('txtName').value ;
|
|
|
58 |
|
|
|
59 |
if ( eSelected && eSelected._fckplaceholder == sValue )
|
|
|
60 |
return true ;
|
|
|
61 |
|
|
|
62 |
if ( sValue.length == 0 )
|
|
|
63 |
{
|
|
|
64 |
alert( FCKLang.PlaceholderErrNoName ) ;
|
|
|
65 |
return false ;
|
|
|
66 |
}
|
|
|
67 |
|
|
|
68 |
if ( FCKPlaceholders.Exist( sValue ) )
|
|
|
69 |
{
|
|
|
70 |
alert( FCKLang.PlaceholderErrNameInUse ) ;
|
|
|
71 |
return false ;
|
|
|
72 |
}
|
|
|
73 |
|
|
|
74 |
FCKPlaceholders.Add( sValue ) ;
|
|
|
75 |
return true ;
|
|
|
76 |
}
|
|
|
77 |
|
|
|
78 |
</script>
|
|
|
79 |
</head>
|
|
|
80 |
<body scroll="no" style="OVERFLOW: hidden">
|
|
|
81 |
<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
|
|
|
82 |
<tr>
|
|
|
83 |
<td>
|
|
|
84 |
<table cellSpacing="0" cellPadding="0" align="center" border="0">
|
|
|
85 |
<tr>
|
|
|
86 |
<td>
|
|
|
87 |
<span fckLang="PlaceholderDlgName">Placeholder Name</span><br>
|
|
|
88 |
<input id="txtName" type="text">
|
|
|
89 |
</td>
|
|
|
90 |
</tr>
|
|
|
91 |
</table>
|
|
|
92 |
</td>
|
|
|
93 |
</tr>
|
|
|
94 |
</table>
|
|
|
95 |
</body>
|
|
|
96 |
</html>
|