View previous topic :: View next topic |
Author |
Message |
name_me
Joined: 31 Jan 2003 Posts: 12 Location: Ukraine
|
Posted: Tue Apr 08, 2003 8:18 am Post subject: [request] need htmlarea to attach |
|
|
Hello ppl!
Can someone attach htmlarea instead of post textarea content in post editor? It's awesome WYSIWYG html editor written on java.
Look at it by yourself
http://www.interactivetools.com/products/htmlarea/
It's a pity, but am failed (though am not really good at html/php).. |
|
Back to top |
|
 |
alanp
Joined: 14 Sep 2003 Posts: 35
|
Posted: Fri Nov 21, 2003 12:59 am Post subject: |
|
|
did you still need help with this? I've installed the same program you're talking about. |
|
Back to top |
|
 |
name_me
Joined: 31 Jan 2003 Posts: 12 Location: Ukraine
|
Posted: Fri Nov 21, 2003 12:00 pm Post subject: |
|
|
alanp wrote: | did you still need help with this? I've installed the same program you're talking about. |
That's will be great  |
|
Back to top |
|
 |
stevem
Joined: 15 Mar 2003 Posts: 15
|
Posted: Fri Nov 21, 2003 9:20 pm Post subject: |
|
|
I'd also be interested in how to install htmlarea. I have used it elsewhere but haven't tried it with b2 and would appreciate help in doing so. |
|
Back to top |
|
 |
stevem
Joined: 15 Mar 2003 Posts: 15
|
Posted: Sat Nov 22, 2003 11:20 pm Post subject: |
|
|
I have had a go at installing htmlarea and have had some success. But
- I couldn't get the latest version (which is a beta anyway) to work so I used the stable version 2
- using htmlarea means that the current buttons (quicktags) and smilies don't work as the textbox they expect are no longer there, so I have disabled them (in b2config.php).
I hope that others will be able to improve on what I've done.
I have used the minimum changes to current files (just one addition in each of 2 files) and put all the new code in 2 new files which can then be easily altered.
I have put the htmlarea files in the top directory /htmlarea. Change the path if necessary in htmlarea_head.php
b2header.php
Code: | AFTER
<html>
<head>
ADD
<?php include($b2inc."/htmlarea_head.php"); ?> |
b2include/b2edit.form.php
Code: | AFTER
<?php } else { ?>
<textarea rows="9" cols="40" style="width:100%" name="content" tabindex="4" wrap="virtual"><?php echo $content ?></textarea><br />
<?php } ?>
ADD
<?php
$textarea="content";
include_once($b2inc."/htmlarea_echo.php");
?> |
Upload 2 new files to the include directory
include/htmlarea_head.php
Change the path in line 3 to wherever you uploaded htmlarea
Code: | <!-- START : EDITOR HEADER - INCLUDE THIS IN ANY FILES USING EDITOR -->
<script language="Javascript1.2"><!-- // load htmlarea
_editor_url = "../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 > 0) {
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>
<!-- END : EDITOR HEADER --> |
include/htmlarea_echo.php
alter config.bodyStyle to whatever you like
Code: | <?php
echo "\n\n".'<script language="javascript1.2" defer>'."\n";
echo 'var config = new Object();'."\n";
echo 'config.width = "100%";'."\n";
echo 'config.debug = 0;'."\n";
echo 'config.bodyStyle = \'background-color: "#f0f0f0"; font-family: "Verdana"; font-size: x-small;\';'."\n";
echo 'editor_generate'.
'("'.$textarea.'",config);'."\n";
echo '</script>'."\n\n";
?> |
I hope this is helpful |
|
Back to top |
|
 |
|