I made a small plugin that creates a custom bbcode. it replaces a [item]id[/item]
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:
[item]4[/item] gives:
<!-- startitem 4 -->...here is the html table stuff...<!-- enditem -->
now in wysiwyg_start_parse i have created following hook code:
Code:
$text = preg_replace("/<!-- startitem (\d+) -->.*<!-- enditem -->/","[item]\$1[/item]", $text);
which switches it back from html to bbcode