Closed dtturcotte closed 7 months ago
BBCodeText has escape tag : Tags between [esc] ... [/esc] or [raw] ... [/raw] will be treated as content.
[esc][color=yellow]Text[/color][/esc]
[esc][raw]Text[/raw][/esc]
[raw][esc]Text[/esc][/raw]
[raw][b]Text[/b][/raw]
Does it meet your needs?
Hi, not exactly. I need something I can uniquely identify an enclosed string with, without revealing the tag itself.
Something like [id=1] [area=x]X[/area] [area=y]Y[/area] [/id]
, where [id=1][/id]
tags are not visible on screen. This way I can script something like find all text between
[id=1] ... [/id]and add / remove it. I cannot use
area` tags for this because I have multiple area tags that belong to a single thing (thing with ID 1).
Add [id=name]...[/id]
tag. Do nothing, just a marker in content string. Please see this demo, line 12, 13.
NPM package will upgrade at end of this month.
Wait, has this always existed or did you just add it? Thanks so much!
Added at latest commit. So it does not include in npm package yet.
Let's say I have text string
I want to remove
[area=hello]hello[/area]
from the string. Instead of trying to use regex to replace[area=hello]hello[/area]
explicitly, it would be more helpful if there were hidden wrapper tags I could wrap each word in, such asIt doesn't have to be "id" exactly, but I need wrapper tags that aren't displayed to the user, but that I can use for text manipulation in code. In the instance above, I cannot simply target
[area=hello]
, because I need a specific instance of that "hello" substring. With[id=1]
, I can target anything between[id=1]
and[/id]
tags.Thank you!