[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

11/30/2008 at 04:25PM PST, ID: 23945591
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.3

Help using TinyMCE to limit text areas aplied to.

Asked by elliottbenzle in JavaScript, Cascading Style Sheets (CSS)

I'm using a WYSIWYG editor called TinyMCE to edit my form data. On one of my pages I want to be able to apply the text editor to one text area but not to another. I found this code from the TinyMCE site:

Option: editor_selector
This option enables you to specify a CSS class name that will be required on the text areas that are to be converted. In order for this option to take effect, you must also have TinyMCE:Configuration/mode set to specific_textareas.

tinyMCE.init({
      ...
      mode : "specific_textareas",
      editor_selector : "mceEditor"
});

<textarea id="myarea1" class="mceEditor">This will be an editor.</textarea>
<textarea id="myarea2">This will NOT be an editor.</textarea>

FROM PAGE:  http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/editor_selector

But when I try to apply this to my own page none of the fields are given the editor.

      tinyMCE.init({
            // General options
          mode : "specific_textareas",
            editor_selector : "mceEditor"

<textarea name="varbodytext" class="mceEditor" id="varbodytext" cols="45" rows="5"><% = (oldbodytext) %></textarea>

Any ideas as to what I'm doing wrong here? Thanks.

My  page: http://www.glowfishtw.com/flagfootball/tinymce/examples/updateslidetext.asp?ID=2



1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../../Connections/flagfootball.asp" -->
<%
Dim slidenumber
slidenumber = (Request.QueryString("ID"))
%>
<%
Dim rsslideshow__MMColParam
rsslideshow__MMColParam = "1"
If (Request.QueryString("ID") <> "") Then 
  rsslideshow__MMColParam = Request.QueryString("ID")
End If
%>
<%
Dim rsslideshow
Dim rsslideshow_cmd
Dim rsslideshow_numRows
 
Set rsslideshow_cmd = Server.CreateObject ("ADODB.Command")
rsslideshow_cmd.ActiveConnection = MM_flagfootball_STRING
rsslideshow_cmd.CommandText = "SELECT * FROM slideshow WHERE ID = ?" 
rsslideshow_cmd.Prepared = true
rsslideshow_cmd.Parameters.Append rsslideshow_cmd.CreateParameter("param1", 5, 1, -1, rsslideshow__MMColParam) ' adDouble
 
Set rsslideshow = rsslideshow_cmd.Execute
rsslideshow_numRows = 0
 
Dim oldbodytext
oldbodytext = (rsslideshow.Fields.Item("varbodytext").Value)
%>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
 
<!-- TinyMCE -->
<script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
	tinyMCE.init({
		// General options
	    mode : "specific_textareas",
		editor_selector : "mceEditor"
		theme : "advanced",
		plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
 
		// Theme options
		theme_advanced_buttons1 : "cut,copy,paste,|,outdent,indent,|,undo,redo,|,link,unlink,|,insertdate,inserttime,|,forecolor,backcolor,|,charmap,emotions,nonbreaking",
		theme_advanced_buttons2 : "",
		theme_advanced_buttons3 : "",
		theme_advanced_buttons4 : "",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true,
 
		// Example content CSS (should be your site CSS)
		content_css : "css/content.css",
 
		// Drop lists for link/image/media/template dialogs
		template_external_list_url : "lists/template_list.js",
		external_link_list_url : "lists/link_list.js",
		external_image_list_url : "lists/image_list.js",
		media_external_list_url : "lists/media_list.js",
 
		// Replace values for the template plugin
		template_replace_values : {
			username : "Some User",
			staffid : "991234"
		}
	});
</script>
<!-- /TinyMCE -->
 
<style type="text/css">
<!--
body {
	font: 100% Verdana, Arial, Helvetica, sans-serif;
	background: #666666;
	margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
	padding: 0;
	text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
	color: #000000;
}
.oneColFixCtrHdr #container {
	width: 780px;  /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */
	background: #FFFFFF;
	margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
	border: 1px solid #000000;
	text-align: left; /* this overrides the text-align: center on the body element. */
}
.oneColFixCtrHdr #header {
	background: #DDDDDD;  /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
	text-align: center;
	margin-bottom: 10px;
	padding-top: 0;
	padding-right: 10px;
	padding-bottom: 0;
	padding-left: 20px;
}
.oneColFixCtrHdr #header h1 {
	margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */
	padding: 10px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
}
.oneColFixCtrHdr #mainContent {
	padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
	background: #FFFFFF;
	text-align: center;
}
.listcenter {
	text-align: left;
	width: 600px;
	margin-right: auto;
	margin-left: auto;
}
.oneColFixCtrHdr #footer {
	padding: 0 10px; /* this padding matches the left alignment of the elements in the divs that appear above it. */
	background:#DDDDDD;
}
.oneColFixCtrHdr #footer p {
	margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
	padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
}
.style2 {font-size: 12px}
-->
</style>
</head>
 
<body class="oneColFixCtrHdr">
 
<div id="container">
  <div id="header">
    <h1>Update Slide Number <% response.write(slidenumber) %></h1>
    <!-- end #header --></div>
  <div id="mainContent">
    <form action="../../updateslideshowintupload.asp" method="post" enctype="multipart/form-data" name="form1" id="form1">
      <label>Change the Slide Image<br />
      <br />
      <div class="listcenter">      
        <ul>
          <li class="style2">
          Slides must be .jpg format . </li>
        <li class="style2">Slides must be 320px wide and 320px tall. If not they will be resized.</li>
        <li class="style2">Use the photoshop template to add the grey box to the bottom of the slides.</li>
        </ul>
      </div>
      <div align="center"><br />
        upload new image: 
        <input type="file" name="fileField" id="fileField" />
        </label>
        <br />
        <br />
      </div>
      <div align="center">
        <textarea name="varheader" id="varheader" cols="45" rows="5"><%=(rsslideshow.Fields.Item("varheader").Value)%></textarea>
        <input name="varheaderold" type="hidden" id="varheaderold" value="<%=(rsslideshow.Fields.Item("varheader").Value)%>" />
      </div>
      </label>
      <label></label>
      <div align="center"></div>
      <div align="center">
        <textarea name="varbodytext" class="mceEditor" id="varbodytext" cols="45" rows="5"><% = (oldbodytext) %></textarea>
        <br />
        <label>
        <input name="varoldbody" type="hidden" id="varoldbody" value="<% = (oldbodytext) %>" />
        </label>
</div>
      <p align="center">
        <label>
        <input type="submit" name="button" id="button" value="Continue" />
        </label>
        <input name="slidenumber" type="hidden" id="slidenumber" value="<% = slidenumber %>" />
      </p>
      <!-- end #mainContent -->
    </form>
  </div>
  <div id="footer">
    <p>&nbsp;</p>
  <!-- end #footer --></div>
<!-- end #container --></div>
</body>
</html>
<%
rsslideshow.Close()
Set rsslideshow = Nothing
%>
[+][-]11/30/08 05:19 PM, ID: 23065669

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: JavaScript, Cascading Style Sheets (CSS)
Sign Up Now!
Solution Provided By: cxr
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20090824-EE-VQP-74 - Hierarchy / EE_QW_2_20070628