Fighting with Tinymce
3 posts by 2 authors in: Forums > CMS Builder
Last Post: November 26, 2012 (RSS)
By gadefgaertgqe - November 24, 2012 - edited: November 26, 2012
Hi,
So Tinymce is again giving me a headache with it's insistence to do things I don't want (yes, I am a little grumpy!) ;)
I need to filter out the <tbody></tbody> tags in the output:
However I am unable to get PHP to strip the tags out. Here is my broken code:
Hope someone can help ;)
Thanks
Paul
So Tinymce is again giving me a headache with it's insistence to do things I don't want (yes, I am a little grumpy!) ;)
I need to filter out the <tbody></tbody> tags in the output:
However I am unable to get PHP to strip the tags out. Here is my broken code:
<?php $filter = $record['content']; ?>
<?php $filter = str_replace("/</tbody>/", "", $filter); ?>
<?php $filter = str_replace("/<tbody>/", "", $filter); ?>
<?php echo $filter ?>
Hope someone can help ;)
Thanks
Paul
Re: [8bit Pixel] Fighting with Tinymce
By gregThomas - November 26, 2012 - edited: November 26, 2012
Hi Paul,
I've done some local testing, and this should do the trick:
I think the str_replace you were using was looking for the forward slashes as well.
Thanks!
I've done some local testing, and this should do the trick:
<?php
$filter = str_replace('</tbody>', '', $filter);
$filter = str_replace('<tbody>', '', $filter);
echo $filter;
?>
I think the str_replace you were using was looking for the forward slashes as well.
Thanks!
Greg Thomas
PHP Programmer - interactivetools.com
PHP Programmer - interactivetools.com
Re: [greg] Fighting with Tinymce
Thanks Greg, that did the trick. I always get tied up in knots with the replace function. However I think I can see what was happening.
Thanks for all the help!
Paul
Thanks for all the help!
Paul