Skip to content

Use it !

How to

  1. Build your circuit on the editor, and click on the share icon () of one Mode sub-menu (hover the sub-menus for description).

  2. Copy/paste the Markdown/Myst code to your md page. That's it !

It will look like this:

Logic Circuit Simulator code
```{.logic  height=500 mode="full" }
{ 
v: 6,
components: {
    out0: {type: 'out', pos: [415, 145], id: 0},
    in0: {type: 'in', pos: [275, 145], id: 1, val: 1},
    not0: {type: 'not', pos: [345, 145], in: 2, out: 3},
},
wires: [[3, 0], [1, 2]]
}
```
3. (optional) Adjust more parameters if needed.

Editor

With mode=full enabled, you can export the circuit to Markdown/Myst directly from the editor.

Parameters

  • Header options : ex. {.logic showonly="out and or xor not" height=300 mode=full}
    • set available gates with the showonly option
    • choose mode (full, design, connect, tryout and static)
    • set css height in px (150px by default)
  • json options : ex. opts: {showGateTypes: true, animateWires: true},
    • showGateTypes (bool) to display gates names
    • animateWires (bool)
    • zoom (int)
    • More options into Admin parameters

Example

Example

A design mode showing only out, and, or, xor and not gates :

Code

Logic Circuit Simulator code
```{.logic showonly="out and or xor not" height=300 mode=design}

{ // JSON5
  v: 6,
  opts: {showGateTypes: true, animateWires: true},
  components: {
    out0: {type: 'out', pos: [415, 145], id: 0},
    in0: {type: 'in', pos: [275, 145], id: 1, val: 1},
    not0: {type: 'not', pos: [345, 145], in: 2, out: 3},
  },
  wires: [[3, 0], [1, 2]]
}
```

Result