ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 21 Jan 2013 11:40:13 +0100Tiddlywiki and Sage Cell Serverhttps://ask.sagemath.org/question/9716/tiddlywiki-and-sage-cell-server/Hi,
Has anyone been successful in embedding a Sage cell in a Tiddlywiki wiki? Any help would be appreciated.
Thanks,
Matthew HendersonFri, 18 Jan 2013 11:00:06 +0100https://ask.sagemath.org/question/9716/tiddlywiki-and-sage-cell-server/Comment by kcrisman for <p>Hi,</p>
<p>Has anyone been successful in embedding a Sage cell in a Tiddlywiki wiki? Any help would be appreciated.</p>
<p>Thanks,
Matthew Henderson</p>
https://ask.sagemath.org/question/9716/tiddlywiki-and-sage-cell-server/?comment=18378#post-id-18378Does it accept arbitrary HTML somehow? That would do it.Fri, 18 Jan 2013 13:05:33 +0100https://ask.sagemath.org/question/9716/tiddlywiki-and-sage-cell-server/?comment=18378#post-id-18378Comment by MHenderson for <p>Hi,</p>
<p>Has anyone been successful in embedding a Sage cell in a Tiddlywiki wiki? Any help would be appreciated.</p>
<p>Thanks,
Matthew Henderson</p>
https://ask.sagemath.org/question/9716/tiddlywiki-and-sage-cell-server/?comment=18373#post-id-18373It does but it translates:<html>
<div id="sagecell"></div>
</html> into <pre><html>
<div id="sagecell"></div>
</html>
</pre>!!Mon, 21 Jan 2013 05:39:02 +0100https://ask.sagemath.org/question/9716/tiddlywiki-and-sage-cell-server/?comment=18373#post-id-18373Answer by Jason Grout for <p>Hi,</p>
<p>Has anyone been successful in embedding a Sage cell in a Tiddlywiki wiki? Any help would be appreciated.</p>
<p>Thanks,
Matthew Henderson</p>
https://ask.sagemath.org/question/9716/tiddlywiki-and-sage-cell-server/?answer=14471#post-id-14471I think I would probably create a tiddly plugin. You basically need to do two things:
* edit the html file to include step 1 of http://sage.math.washington.edu/home/jason/sagecellslides/#slide-20 (or make a plugin to do this)
* figure out how to get a function called anytime a tiddler was done being edited, and make any class 'sage' divs into sagecells using something like the makeSagecell command above.
Fri, 18 Jan 2013 18:19:56 +0100https://ask.sagemath.org/question/9716/tiddlywiki-and-sage-cell-server/?answer=14471#post-id-14471Comment by MHenderson for <p>I think I would probably create a tiddly plugin. You basically need to do two things:</p>
<ul>
<li><p>edit the html file to include step 1 of <a href="http://sage.math.washington.edu/home/jason/sagecellslides/#slide-20">http://sage.math.washington.edu/home/...</a> (or make a plugin to do this)</p></li>
<li><p>figure out how to get a function called anytime a tiddler was done being edited, and make any class 'sage' divs into sagecells using something like the makeSagecell command above.</p></li>
</ul>
https://ask.sagemath.org/question/9716/tiddlywiki-and-sage-cell-server/?comment=18364#post-id-18364I think you're right. It doesn't look too hard so I think I'll give it a shot.Mon, 21 Jan 2013 11:40:13 +0100https://ask.sagemath.org/question/9716/tiddlywiki-and-sage-cell-server/?comment=18364#post-id-18364Comment by MHenderson for <p>I think I would probably create a tiddly plugin. You basically need to do two things:</p>
<ul>
<li><p>edit the html file to include step 1 of <a href="http://sage.math.washington.edu/home/jason/sagecellslides/#slide-20">http://sage.math.washington.edu/home/...</a> (or make a plugin to do this)</p></li>
<li><p>figure out how to get a function called anytime a tiddler was done being edited, and make any class 'sage' divs into sagecells using something like the makeSagecell command above.</p></li>
</ul>
https://ask.sagemath.org/question/9716/tiddlywiki-and-sage-cell-server/?comment=18366#post-id-18366These look relevant: http://tiddlywikiguides.org/index.php?title=Getting_started_with_custom_tiddler_fields and http://tiddlywikiguides.org/index.php?title=Getting_started_with_custom_macrosMon, 21 Jan 2013 10:49:15 +0100https://ask.sagemath.org/question/9716/tiddlywiki-and-sage-cell-server/?comment=18366#post-id-18366Comment by MHenderson for <p>I think I would probably create a tiddly plugin. You basically need to do two things:</p>
<ul>
<li><p>edit the html file to include step 1 of <a href="http://sage.math.washington.edu/home/jason/sagecellslides/#slide-20">http://sage.math.washington.edu/home/...</a> (or make a plugin to do this)</p></li>
<li><p>figure out how to get a function called anytime a tiddler was done being edited, and make any class 'sage' divs into sagecells using something like the makeSagecell command above.</p></li>
</ul>
https://ask.sagemath.org/question/9716/tiddlywiki-and-sage-cell-server/?comment=18372#post-id-18372Reading a bit more I think I do have to write a plugin but I was hoping to avoid it because Tiddlywiki makes it easy to add the Sage code to the header of the wiki. The only problem I can see is how to add raw HTML to the wiki. A similar problem is mentioned here http://blog.ssokolow.com/archives/2011/10/16/floating-flattr-buttons-in-tiddlywiki/Mon, 21 Jan 2013 05:43:19 +0100https://ask.sagemath.org/question/9716/tiddlywiki-and-sage-cell-server/?comment=18372#post-id-18372Comment by Jason Grout for <p>I think I would probably create a tiddly plugin. You basically need to do two things:</p>
<ul>
<li><p>edit the html file to include step 1 of <a href="http://sage.math.washington.edu/home/jason/sagecellslides/#slide-20">http://sage.math.washington.edu/home/...</a> (or make a plugin to do this)</p></li>
<li><p>figure out how to get a function called anytime a tiddler was done being edited, and make any class 'sage' divs into sagecells using something like the makeSagecell command above.</p></li>
</ul>
https://ask.sagemath.org/question/9716/tiddlywiki-and-sage-cell-server/?comment=18365#post-id-18365I looked at macros and other things, and it still seemed that the best solution was a plugin. The thing is that you have to be able to give a block of code and you have to run some javascript on that block of code when a tiddler is saved. I don't know a lot about tiddlywiki, though---maybe there is a way to do that without writing a plugin?Mon, 21 Jan 2013 11:26:32 +0100https://ask.sagemath.org/question/9716/tiddlywiki-and-sage-cell-server/?comment=18365#post-id-18365