![]() |
Character_limiter with HTML - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Character_limiter with HTML (/showthread.php?tid=14005) |
Character_limiter with HTML - El Forum - 12-15-2008 [eluser]AjTimme[/eluser] Hi guys, I hope i have a simple question... I'm using the text helper - character_limiter but i have a little problem. The text i have is html code. So i have bold and underline tags in my text. So I would like to know how i can limit my text without having unclosed tags... Is that possible? Thanks! Tim Character_limiter with HTML - El Forum - 12-15-2008 [eluser]sikkle[/eluser] The easy shot is to where you want to cut text cut it withouth html tags with strip_tags. Then when you show it all where it make sense. good luck. Character_limiter with HTML - El Forum - 12-15-2008 [eluser]AjTimme[/eluser] Mmm yes i know what you mean but it's kinda odd to show the text without bold and underline for 300 chars and if you click through you see the same text but WITH formatting. However... you may be right... it's not that important anyway. Thanks! Character_limiter with HTML - El Forum - 12-15-2008 [eluser]sikkle[/eluser] I tend to want control over title or stripped text to make them css friendly all the time. So i mean you can make them be whatever fitting with the spot they are and control them. Good luck ! Character_limiter with HTML - El Forum - 12-15-2008 [eluser]Kotzilla[/eluser] Word limiter with tag it's hard to cut. for example. imagine if word like this "<font color="red"><i> 1 ..<u> 60 ... 70 </u> .. 100 </i></font>" but you have to limiter with 65 character after this paragraph will be in tag too stip_tag should be great solution =) |