Copy link to clipboard
Copied
HI
I am going to ask this anyway, but it seems that the only way to really use these is to add something like tinymsc.
2 things i would like to achieve.
i would like to remove the scroll bar and keep the text area at the size i defined 65 cols x 4 rows, no scroll bar. overflow:hidden does not seem to work here.
the second issue is with saving/re-dsiplaying the data.
if you hit enter in the text box, it appears to add to extra line breaks into the data, so when it's displayed again it shows the text with 2 extra lines inserted.
i and this to appear as typed.
I have looked at nl2br and str_replace, but i am not sure if i am using them as i should.
example here -
typing text and then hitting enter<br />
<br />
<br />
seems to add 2 more line breaks<br />
<br />
<br />
which i do not want.<br />
<br />
it should be
typing text and then hitting enter<br />
seems to add 2 more line breaks<br />
which i do not want.<br />
any suggestions before i have to start adding another 3rd party tool??
Thanks
Copy link to clipboard
Copied
well i found a post elsewhere that gave me the solution
I can't find the full post now, lost the link...
TinyMCE did not work out very well.
so here is what i came up with, the origional post i found had a larger array, but i cut it down to what suited
function convertTextarea($tval) {
$newtext = str_replace(array("\n\r","\n"), '', $tval);
return $newtext;
}
anyway maybe this will help others.
do i get 10 points ... !!
KM
Copy link to clipboard
Copied
Answered myself.
code in reply