Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


BrickJax in Action


We've put together a script that we're hoping to get added to LEGO Answers that will allow users to easily insert images of Bricks, with or without links, and also links to sets on various listings sites via simple tags.

The supported tags are:

  • [part:3700:4]
    Draw a part (Technic Brick 1 x 2 with Hole) in a colour (red).
  • [partlink:3700:4]
    Draw a part (Technic Brick 1 x 2 with Hole) in a colour (red) and link to it on
  • [set:5590]
    Link to set 5590 on Peeron.
  • [bl:5590]
    Link to set 5590 on BrickLink.
  • [bs:5590]
    Link to set 5590 on BrickSet.


The script makes use of the jQuery replaceText script and therefore must be used in a way consistent with that plugin's dual MIT/GPLv2 license.


install / update script | Source - Updated 05/01/12


The following question and answers has some codes in comments and my answer that will show this in action:

Code to insert parts


The script should work under all major userscript-supporting browsers, however it's currently only been tested under Firefox/GreaseMonkey. Please file a bug if you encounter any issues.


Zhaph - Ben Duguid actively maintains this script, with the bulk of the original code developed by Kevin Cathcart.

You can also find us in Chat at Bricks.SE Parts JavaScript Discussion

share|improve this question
Cool! I'm going to try this out right away. – Nathan Osman Dec 18 '11 at 0:18
Do you have an example question / answer I can test the script with? – Nathan Osman Dec 18 '11 at 0:21
@GeorgeEdison - Sorry, yep, on our meta: There should be at least one in some comments, and a couple in my answer. – Zhaph - Ben Duguid Dec 18 '11 at 9:05

You must log in to answer this question.

Browse other questions tagged .