Skip to content
Discussion options

You must be logged in to vote

Thanks! With that hint, I've figured it out. Here's a minimal working example for use in a JavaScript Block if anyone else was wondering:

const diceRollerPlugin = app.plugins.getPlugin("obsidian-dice-roller");

addDice = async function (diceString, parent) {
  const diceRoller = await diceRollerPlugin.getRoller(diceString);
  const el = await diceRoller.containerEl;
  parent.appendChild(el);
}

const div = createEl('div');

addDice('1d20+7', div);

return div;

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@ThaddaeusWiedemer
Comment options

@ThaddaeusWiedemer
Comment options

@valentine195
Comment options

@ThaddaeusWiedemer
Comment options

Answer selected by ThaddaeusWiedemer
@valentine195
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants