Forum Moderators: coopster

Message Too Old, No Replies

wysiwyg editor

         

may_hem1

6:03 pm on Jun 23, 2004 (gmt 0)

10+ Year Member



Hi,

I've implemented a wysiwyg editor into a Web site using php. It works OK besides the fact that when there is a longer text to be edited in the wysiwyg editor, it cuts off the content and displays only around 300 words. I have checked the settings of the editor but couldn't see the cause of this problem. Can anyone help?

Thanks

May

babloo

11:53 am on Jun 24, 2004 (gmt 0)

10+ Year Member



Can u just paste the editor code, So that we can figure out what actually went wront.

Thanks.

donovanh

11:59 am on Jun 24, 2004 (gmt 0)

10+ Year Member



Are you certain the editor is the problem? If the content is being stored in a database, check the field it is being stored in doesn't restrict the content to a certain length..

Don

brucec

4:57 pm on Jun 24, 2004 (gmt 0)

10+ Year Member



Yeah, is the code in a database? If so, maybe you can make the HTML code field a TEXT field type instead of a VARCHAR which cuts off after 255 chars

ergophobe

5:26 pm on Jun 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It's cutting off at 300 words (so roughly 1500 chars), so it's certainly not a mysql varchar. I suspect rather that there is some max size in the html itself, but depending on which wysiwyg editor it may take some screwing around to figure out how/where that's set.

I've been struggling a bit with HTMLArea myself.

Tom

may_hem1

8:22 pm on Jun 24, 2004 (gmt 0)

10+ Year Member



The content is being stored in a file on the server. The wysiwyg editor I use is "htmlArea v2.03".

Here is the code from the text editor which does the content replacement:

<form method="post" action="update.php?">
<input type="hidden" name="name" value="<?=$tname?>" />
<tr>
<td bgcolor="#3333cc"><font face="Arial" size="3" color="#ffffff"><strong>Edit text block</strong></font></td>
</tr>
<tr>
<td><textarea name="editor_text" rows="10" cols="60"></textarea><br />
<script language="javascript1.2">
document.all.editor_text.value = Base64Decode('\'' + window.dialogArguments + '\'');
editor_generate('editor_text', stdConfig());
</script></td>
</tr>
</form>
---------------------------
The code in the update.php is:

<?
require_once "inc/functions.php";

$name = $_POST['name'];
$content = $_POST['content'];
$page = $_POST['page'];

$filename = CONTENTDIR . '/' . $name . '.htm';
$fp = fopen($filename, 'wb');
fwrite($fp, stripslashes($content), strlen(stripslashes($content)));
fclose($fp);

?>
-------------------------------------
Thanks

May

ergophobe

10:10 pm on Jun 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




<textarea name="editor_text" rows="10" cols="60"></textarea>

The problem is, that's not the actual code. When you run htmlArea, it will only use this code if the browser does not support htmlArea. It the browser DOES work with HA, it will replace this client side and you can't see the actual form that is in use.

As far as I know, though, HA should not have a built-in limit. They have a pretty good forum just for htmlArea questions. You might try over there.

Tom

may_hem1

7:00 am on Jun 25, 2004 (gmt 0)

10+ Year Member



OK, I'll check out the HA forum. Thanks Tom.