Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 423631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:11:57+00:00 2026-05-12T19:11:57+00:00

I’m starting a Stack Exchange site and I want to be able to intercept

  • 0

I’m starting a Stack Exchange site and I want to be able to intercept the question text before and after the markdown script gets at it.

I want to be be able to enter [custom-tag]stuff to be altered[/custom-tag] in the question window, and then have the stuff to be altered removed (as the standard markdown engine won’t be able to interpret it) store it, and then replace the tags in the output with the stuff to be altered after it has been processed by my own (server-side) engine.

I’m failing at the first step; I can’t find the markdown javascript is. Is it somewhere hidden in /content/js/master.js?

Edit: I will try and make this a bit clearer with an example of what I am trying to achieve.

I’m running a Poker oriented SE site. Players discuss poker hands but instead of entering the plain text transcript of what happened in a hand, they will use a converter to make it more readable.

So, instead of posting up this on a forum:

PokerStars Game #29112867044:  Omaha Pot Limit ($100/$200) - 2009/06/07 19:51:27 ET
Table 'Thomsen' 9-max Seat #2 is the button
Seat 2: Mary & Joey ($14729 in chips) 
Seat 4: William ($28306 in chips) 
Mary & Joey: posts small blind $100
William: posts big blind $200
*** HOLE CARDS ***
Mary & Joey: raises $400 to $600
William: calls $400
*** FLOP *** [6d Td 3c]
William: checks 
Mary & Joey: checks 
*** TURN *** [6d Td 3c] [Kc]
William: checks 
Mary & Joey: checks 
*** RIVER *** [6d Td 3c Kc] [7d]
William: bets $600
Mary & Joey: folds 
Uncalled bet ($600) returned to William
William collected $1198 from pot
William: doesn't show hand 
*** SUMMARY ***
Total pot $1200 | Rake $2 
Board [6d Td 3c Kc 7d]
Seat 2: Mary & Joey (button) (small blind) folded on the River
Seat 4: William (big blind) collected ($1198)

they will first go to a 3rd party website and convert it to this:

PokerStars Pot-Limit Omaha, $200.00 BB (2 handed)

SB ($14729)
BB ($28306)

Preflop:
SB bets $600, BB calls $400

Flop: ($1200) 6, 10, 3 (2 players)
BB checks, SB checks

Turn: ($1200) K (2 players)
BB checks, SB checks

River: ($1200) 7 (2 players)
BB bets $600, 1 fold

Total pot: $1200 | Rake: $2

I want to cut out the step where the user has to go to a 3rd party website, paste in their hand, select HTML output and then copy and paste the result into the question. Instead I want them to just be able to wrap the raw hand test with [hand][/hand] tags and the conversion will be handled automatically.

Edit 2:

On further investigation it looks like this is not possible (without a lot of hacky JS).
One would need to get around Ajax cross domain issues firstly to use any external service to do the converting.

Then if you manage to override the WMD preview – you still have to work out what to do when the actual answer is rendered normally. One way to do it would be to have JS look for the tag whenever any question or answer is rendered and update the DOM with a converted version -which would suck from a performance POV.

I think I’ll have to wait and hope SE allow some other way for us to override this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T19:11:58+00:00Added an answer on May 12, 2026 at 7:11 pm

    WMD automatically populates the preview element as you type, right? Well, it needs to have a converter somewhere to do this. That converter is Showdown (which you could obtain here). Here is its usage (pulled from the source file):

    // Showdown usage:
    
    var text = "Markdown *rocks*.";
    
    var converter = new Showdown.converter();
    var html = converter.makeHtml(text);
    

    This means that you can simply not use the preview element that is provided, in favor of your own that you populate yourself. Furthermore, you will need to listen to the keypress event on the textarea yourself and do your parsing of the text, followed by calling Showdown. When the output is as you like it, throw it into your own preview element.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.