xcandiottix Posted September 8, 2010 Share Posted September 8, 2010 How can I take a text input, find any 'word' thats more then say 50 characters long, then add a space or preferably html #8203 to cause a line break after the 50th character? Ex: wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww www ww wwwwww Find any word that has >=50 characters add line break result: wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww www ww wwwwww I know this has something to do with preg_match or regex but I'm awful with learning their functionality so far. Any help would be greatly appreciated. (tinyMCE has a glitch which causes entered text to exceed it's iframe dimensions, posting a text string that can mess up where ever it's posted to, so I need a line break to fix it. The tinyMCE help suggests css but gives no coding information or specific help.) Link to comment https://forums.phpfreaks.com/topic/212821-tinymce-issue/ Share on other sites More sharing options...
Pikachu2000 Posted September 8, 2010 Share Posted September 8, 2010 Have a look at this user submitted example in the php manual for wordwrap(). It looks like exactly what you're asking for. Link to comment https://forums.phpfreaks.com/topic/212821-tinymce-issue/#findComment-1108532 Share on other sites More sharing options...
xcandiottix Posted September 8, 2010 Author Share Posted September 8, 2010 right on. thanks pik .. you're always a great help to me. Link to comment https://forums.phpfreaks.com/topic/212821-tinymce-issue/#findComment-1108534 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.