header

Collapse

Custom bbcode tag - handling in editor?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Go to Thank You FAST50
    Junior Member
    • 01.2021
    • 23
    • 0
    • 0

    Font Size
    #1

    Custom bbcode tag - handling in editor?

    Go to Thank You
    Hi,

    I'm trying to add a tag that needs to do more than html or js (so I can't use the manager), but I bumped into a puzzler right away.

    I did the following:

    - in core/vb/api/bbcode.php, fetchTagList(), added:

    $tag_list['no_option']['test'] = array('callback'=> 'handle_bbcode_code', etc

    Basically, the same assignment as for the code tag, using the same handler function, just changing the tag name.

    - in core/includes/class_bbcode.php, fetch_tag_list(), the same thing.

    Now when I make a post that has (without the space):

    [c ode]Foo[/code]

    [test]Bar[/test]

    Both are properly and identically formatted. Great. However, when I then edit that post, it looks like this in the editor:

    [c ode]Foo[/code]

    Code:
    bar

    When I save that post, the test tags are lost. Is there another hook for handling the tags inside the editor that I'm missing somewhere?

    Thanks in advance.Go to Top of Post
    Last edited by yilmaz; 19.02.21, 22:52.
    Similar Threads
X

Thread Information

Collapse

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

    Those who read this thread

    Collapse

    Members who have read this thread: 2

    Related Topics

    Collapse

    Topics Statistics Last Post
    Started by Prometheus, 23.06.23, 21:32
    0 responses
    68 views
    0 reactions
    Last Post Prometheus
    Working...
    😀
    😂
    🥰
    😘
    🤢
    😎
    😞
    😡
    👍
    👎

    AdBlock Detected

    Please Disable Adblock

    Please consider supporting us by disabling the ad blocker.

    I've Disabled AdBlock
    Home