Jump to content

TinyMCE issue


xcandiottix

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.