DaFire
08-16-2005, 06:15 PM
I made a small plugin that creates a custom bbcode. it replaces a id
with a small table.
this is working fine.
the problem is when i use the advanced wysiwyg editor to edit this post. this parses my bbcode and shows the table but destroys it when i save the post.
is there a way that the advanced editor just ignores this bbcode and shows the tag instead ?
dafire
answer 1:
ok here is my first solution to the problem .. not sure if it's best ;)
in the template i put two comments around it:
4 gives:
<!-- startitem 4 -->...here is the html table stuff...<!-- enditem -->
now in wysiwyg_start_parse i have created following hook code:
$text = preg_replace("/<!-- startitem (\d+) -->.*<!-- enditem -->/","\$1", $text);
which switches it back from html to bbcode ;)
with a small table.
this is working fine.
the problem is when i use the advanced wysiwyg editor to edit this post. this parses my bbcode and shows the table but destroys it when i save the post.
is there a way that the advanced editor just ignores this bbcode and shows the tag instead ?
dafire
answer 1:
ok here is my first solution to the problem .. not sure if it's best ;)
in the template i put two comments around it:
4 gives:
<!-- startitem 4 -->...here is the html table stuff...<!-- enditem -->
now in wysiwyg_start_parse i have created following hook code:
$text = preg_replace("/<!-- startitem (\d+) -->.*<!-- enditem -->/","\$1", $text);
which switches it back from html to bbcode ;)