Help - Search - Members - Calendar
Full Version: HTMLArea WYSIWYG HTML editor?
Movable Type Community Forum > Additional Resources > Tips and Tricks
bagus
Has anyone checked out HTMLArea? It's an Open source WYSIWYG HTML editor that can be used in place of a text area. The current HTML editor in MT only works (in my experience) on IE and not other browsers (OS X Safari). This might be a cool addition to MT and I was just wondering if anyone has played around with it.
nammer
Here are some search results for HTMLArea-related threads; hopefully they'll give you more information smile.gif

Donna
bagus
Thanks Donna! i tried a search earlier but must have had a typo b/c nothing came up. Sorry for the duplicate post.
nammer
Not a problem - obviously, it's a popular topic, so this thread will come in handy for those who come looking for info later. Hope it's helpful!

Donna
bls1531
I have htmlarea working just great, and I love it. Now I would like to add this area to the extended entry spot, but it seems to be fussy. Any ideas
existentialmoo
I have been trying to get htmlarea installed for weeks, and have followed all the instructions I can find posted here, to no avail.

can you tell us what you did to get it working? I keep getting an error "HTMLArea is undefined".

sad.gif

any help you can give will be appreciated.
danwolfgang
To get HTMLArea to work, first upload everything you downloaded. I added this code right after the link to the stylesheet at the top of the document:
CODE
<script language="Javascript1.2"><!-- // load htmlarea
_editor_url = "http://www.yourdomain.com/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>

Change http://www.yourdomain.com/htmlarea/ to the location where you've uploaded htmlarea to. It might be case sensitive, so be careful typing it out.

Find your entry area code, it looks like this:
CODE
<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>


Right after that

tag, add this:

CODE
<script language="javascript1.2">
var config = new Object();    // create new config object

config.width = "100%";

editor_generate('text',config);
</script>


Save and you're done!
existentialmoo
okay! I got it working! For some reason, i have to put the htmlarea files into my mt installation. This might have been obvious to everyone, but not to me:D

Also, I think sanatize strips some of the tags off, so I'm configuring my preferences to allow those tags. I hope that solves the problem with the colorize function, which i'd really like to have.

thanks for the help:)
existentialmoo
i forgot to note that the "sanitize" issue just applies to where im using it for comments:D
Raffaele
Hi, dwolfgang,

thank you for your solutions htmlarea. It's ok.

Ciao Raffaele
Italy
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.