Help - Search - Members - Calendar
Full Version: htmlarea v.3 (Alpha) works w/Mozilla
Movable Type Community Forum > Additional Resources > Tips and Tricks
draeya
I've got the previous version working using ibarton's setup instructions on the v.2.51 thread which are:
In the head:
CODE
<script language="Javascript1.2"><!-- // load htmlarea
_editor_url = "http://url/to/htmlarea/"; ? ? ? ? ? ? ? ? ? ? // URL to htmlarea files
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac') ? ? ? ?>= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera') ? ? ?>= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5) {
document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
document.write(' language="Javascript1.2"></scr' + 'ipt>'); ?
} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }
// --></script>


and then in the edit_entry.tmpl:
CODE
<tr>
<script language="JavaScript1.2" defer>
var config = new Object(); // create new config object

config.width = "100%";
config.debug = 0;

// Add additional editor config settings here...

editor_generate('text',config);
</script>
<td colspan="2" width="100%" valign="top"><textarea<TMPL_IF NAME=AGENT_MOZILLA> cols=""</TMPL_IF> class="width500" name="text" rows="<TMPL_IF NAME=DISP_PREFS_SHOW_EXTENDED>10<TMPL_ELSE>20</TMPL_IF>" wrap="virtual"><TMPL_VAR NAME=TEXT></textarea><p>


I don't know how to proceed to change this to work with v.3. The install/index.html directions included with the download were the same ones that came with v. 2.51.

I'd really like to use Mozilla with htmlarea. Does anyone have this v.3 running successfully?
srdownie
I tried to install HTMLArea 3 beta in MT 2.64. I'm ending up with a messed-up edit page. Essentially, no editing fields appear. This is how I edited edit_entry.tmpl>
CODE
---
<script src="http://www.myurl.com/mt-static/htmlarea/htmlarea.js" language="JavaScript1.2"></script>
---
and
---
<!-- Added code for HTMLArea -->
<script language="JavaScript1.2" defer>
var win_ie_ver =
parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac') ? ? ? ?>= 0) {
? ? ? ? ? ? ? ?win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) {
? ? ? ? ? ? ? ?win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera') ? ? ?>= 0) {
? ? ? ? ? ? ? ?win_ie_ver = 0; }
if (win_ie_ver >= 5.5)
{
_editor_url = "http://www.myurl.com/mt-static/htmlarea";
var config = new Object(); ? ?// create new config
config.width = "100%";
config.height = "200px";
editor_generate('text',config);
}
</script>
</table></td>
<!-- End of added HTMLArea code -->
---

I put the HTMLArea files inside the mt-static directory.

Any suggestions on what to do next? Thanks!

Scott
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.