How can I set max characters limit in the editor?

729 views
Skip to first unread message

amiregelz

unread,
Oct 13, 2012, 8:41:15 AM10/13/12
to ace-d...@googlegroups.com
I use the editor to submit codes and apparently I can only submit 2048 characters (using POST) - which is the limit.
I want to limit the maximum characters inside the editor so I will know exactly how much I can submit in one time (in one POST request).

Is it possible?
Thanks

Harutyun Amirjanyan

unread,
Oct 13, 2012, 8:48:55 AM10/13/12
to ace-d...@googlegroups.com
add change event listener and check code length in it

But this doesn't sound like a good thing to do.
It is better to use another way for submitting, which doesn't have such
unnatural limit.

amiregelz

unread,
Oct 13, 2012, 1:34:08 PM10/13/12
to ace-d...@googlegroups.com
I don't think there's any other way to send the code through email using PHP?

Harutyun Amirjanyan

unread,
Oct 13, 2012, 2:12:18 PM10/13/12
to ace-d...@googlegroups.com
first result from google
http://www.velocityreviews.com/forums/t164678-html-form-post-size-limit.html
there is no limit on post size
probably you are just using wrong enctype for the form

see https://c9.io/nightwing/php_form

<?php if(isset($_POST['submit'])){
echo $_POST['code'];
} ?>

<form method="post" action="test.php" enctype="multipart/form-data"
name="confreg">
<textarea name="code"></textarea>
<input type="submit" name="submit" value="submit"></input>
</form>
Reply all
Reply to author
Forward
0 new messages