010101 [bbcode] Then this is the content but I may want to [b]bold[/b] this word. [/bbcode]
This already works with Flarum's standard BBcode, and shouldn't be a problem (there's something wrong if your custom [tag]
closes itself with anything other than [/tag]
). See for example:
[u]Underlined content [b]with a section in bold[/b] here[/u]
becomes
Underlined content with a section in bold here
It actually looks to me like that's not the problem your tags are facing. For example, in your (edit: old) spoiler code, the description text - the part in between the tags ([spoiler=content]descrip[b]tion[/b] text[/spoiler]
) can be formatted just fine with BBCode and Markdown.
The problem is not using BBCode between two custom tags, but using BBCode within the tag itself:
[spoiler=can I [b]bold[/b] this text?]description text[/spoiler]
This is more of an issue because the open [spoiler=
can be unintentionally and erroneously closed by the closing bracket of the b]
tag. Maybe the solution to preventing this is to require that the text after the =
has quotes around it? I know of other forums/sites that manage to allow formatting within tags themselves, so it's worth looking into. @datitisev mentioned XSL marking as the key here, which may be the right way to do it if you can figure that out.
EDIT: Just saw your new posts. Thanks so much for the extremely speedy responses and changes, looking forward to trying out the new version!