Strikethrough text tag

Get help developing custom BBCodes or request one.
Post Reply
hrx
Registered User
Posts: 229
Joined: Wed Nov 18, 2015 11:21 am
Location: PL

Strikethrough text tag

Post by hrx »

Hi,

I have such a bbcode strikethrough tag created on the forum:

Code: Select all

[s]{TEXT}[/s]

<span style="text-decoration: line-through;">{TEXT}</span>

Strikethrough: [s]text[/s]
How can I change this code into a div code? Instead of span style. I mean something like:

viewtopic.php?f=438&t=2485656#p15092241
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Strikethrough text tag

Post by Lumpy Burgertushie »

just change span to div and you are done

you also shouldn't be using the TEXT for this. you should probably use SIMPLETEXT instead
.

robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
hrx
Registered User
Posts: 229
Joined: Wed Nov 18, 2015 11:21 am
Location: PL

Re: Strikethrough text tag

Post by hrx »

Thanks for the explanation. Why can not I use {TEXT} here? This tag works correctly.

Code: Select all

[s]{TEXT}[/s]

<div style="text-decoration: line-through;">{TEXT}</div>
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26502
Joined: Fri Aug 29, 2008 9:49 am

Re: Strikethrough text tag

Post by Mick »

{TEXT} matches anything

{SIMPLETEXT} Characters from the latin alphabet (A-Z), numbers, spaces, commas, dots, minus, plus, hyphen and underscore
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Strikethrough text tag

Post by Lumpy Burgertushie »

is this useage not problematic because it is within the html?


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
hrx
Registered User
Posts: 229
Joined: Wed Nov 18, 2015 11:21 am
Location: PL

Re: Strikethrough text tag

Post by hrx »

So in the centering code, also need to change TEXT on SIMPLETEXT?

Code: Select all

[center]{TEXT}[/center]

<div style="text-align: center;">{TEXT}</div>
User avatar
EA117
Registered User
Posts: 2158
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Strikethrough text tag

Post by EA117 »

Though "conceptually" it makes sense "I don't intend to strike-out things other than simple text", in the reality of applying this as a CSS text-decoration override, don't I want to permit striking out "complex things" of which text is only a part of it? e.g. If I changed it from {TEXT} to {SIMPLETEXT}, doesn't that prevent me from just striking out an entire block of text that happens to contain a LIST or some other text-containing element that {SIMPLETEXT} can't describe?

I think that's the answer to the CENTER question anyway; you want to continue using {TEXT}, because you can very well intend to center things besides literally "just text."
Post Reply

Return to “Custom BBCode Development and Requests”