Ask Your Question
1

Is there a way to get embedded sagecells to autoeval?

asked 2015-03-02 19:07:07 -0600

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-02 20:25:59 -0600

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 09:43:35 -0600 )edit
0

answered 2015-03-02 20:15:11 -0600

kcrisman gravatar image

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

edit flag offensive delete link more

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-02 19:07:07 -0600

Seen: 67 times

Last updated: Mar 02 '15