Ask Your Question
1

Is there a way to get embedded sagecells to autoeval?

asked 10 years ago

dr gravatar image

I don't want to have a big "press this button to see the thing" on my page. I just want the interact to be there. I see the javascript has an "autoeval" setting, but I can't figure out how to activate it.

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
0

answered 10 years ago

kcrisman gravatar image

Short answer: this is all quite configurable. See the documentation for embedding and especially here.

Preview: (hide)
link
0

answered 10 years ago

dr gravatar image

nm, I figured it out from the code. is there any documentation of this?

 <script>
  // div.compute turns all "compute" divs into sagecells
  // minimal template means there's no cell editing for the user
  // autoeval means there's no stupid "click here to activate me!" necessary
  // hide: evalButton means the stupid button itself is gone
  $(function() {
     sagecell.makeSagecell({inputLocation: 'div.compute', template: sagecell.templates.minimal, autoeval: true, hide: ['evalButton']});
  });
  </script>
Preview: (hide)
link

Comments

Again, the documentation does have this, e.g. https://github.com/sagemath/sagecell/... I agree one has to read it carefully and know js syntax.

kcrisman gravatar imagekcrisman ( 10 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 10 years ago

Seen: 372 times

Last updated: Mar 03 '15