On 4/2/12 8:17 PM, Jason Grout wrote:
What would it take to add the ability to put sage cells on the sage
wiki? I'm thinking of something like:

{{{#!sagecell
SOME_SAGE_CODE
}}}

and an embedded Sage cell is add at that point in the rendered page. In
other words, that is transformed to:

<div id="random_id"><script
type="text/x-sage">SOME_SAGE_CODE</script></div>
<script type="text/javascript">
$(function () {
sagecell.makeSagecell({inputLocation: '#random_id',
hide: ["computationID", "messages", "sessionTitle"]});
});
</script>

Also, these two things are added to the header of the page:

<script type="text/javascript"
src="http://aleph.sagemath.org/static/jquery.min.js";></script>
<script type="text/javascript"
src="http://aleph.sagemath.org/embedded_sagecell.js";></script>


There might be a conflict between jsmath and mathjax, but it's worth a try.

I see the rawhtml plugin that looks like it could easily be modified to
do this: http://moinmo.in/ParserMarket/RawHTML. I don't know how to
install the plugin, nor how to restart the wiki (if needed). Can someone
help?

I think this plugin might work, but I don't have a way to test it immediately:

https://gist.github.com/2288588

Thanks,

Jason



--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to