Ask Your Question
1

Is there a way to get embedded sagecells to autoeval?

asked 2015-03-03 02:07:07 +0100

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.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-03-03 03:15:11 +0100

kcrisman gravatar image

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

edit flag offensive delete link more
0

answered 2015-03-03 03:25:59 +0100

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>
edit flag offensive delete link more

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 ( 2015-03-03 16:43:35 +0100 )edit

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: 2015-03-03 02:07:07 +0100

Seen: 352 times

Last updated: Mar 03 '15