[pmwiki-users] word wrap

zgrauer at earthlink.net zgrauer at earthlink.net
Mon Apr 18 14:55:41 CDT 2005


The PHP function is trim(put your text here) and it will remove spaces before and after the text. Ltrim and Rtrim will cut off left and right spaces.

PHP may not be helpful here, though, because the issue is that you can't remove spaces if they are used as a formatting aid, unless your macro is smart enough to know which ones were intentional and which inadvertently inserted. Just about anything that is copied from midsentence will have leading, trailing or both kinds of spaces. 

A better idea might be to have a button that will trim marked text, or a box to enter copied text.  An even better idea would be to replaced the space with another symbol denoting unformatted.

Zvi.



More information about the pmwiki-users mailing list