Hi Alex, IMO it doesn't need to work in a code block. The embedded object is the code block.
just use.
title: Javascript side of ajax call to django backend
tags: js, ajax, django, jquery, code-snippet
then some commentary text blablabla....
maybe some links to jquery reference on ajax calls blablabla...
and here the actual code in a code block
<object data="test.txt"
type="text/plain"
style="width:100%;height:400px;" scrolling:yes>
<a href="test.txt" target="_blank">lorem.txt</a>
(missing or not supported)
</object>
instead of the "style" attribute, I'd use a class="myExternalFileClass" So
you can change the CSS styles much easier
<object data="test.txt"
type="text/plain"
class="myExternalFileClass"
scrolling:yes>
<a href="test.txt" target="_blank">lorem.txt</a>
(missing or not supported)
</object>
Imo that should do what you want. To make it more flexible, you can cover
the stuff inside a macro. see:
http://tiddlywiki.com/#Macro%20Definitions%20in%20WikiText
Create a tiddler includeCodeStyles and tag it with $:/tags/Stylesheet
.includeCode {
width:100%;
height:400px;
}
Create a tiddler eg: includeCodeMacros and tag it $:/tags/Macro
\define includeCode(file type:"text/plain" class:"includeCode" emptyText:"
- missing or not supported" )
<object data="$file$" type="$type$" scrolling:yes class="$class$"> <a
href="$file$" target="_blank">$file$</a>$emptyText$</object>
\end
use it with:
<<includeCode file:"test.txt">>
or import the attached includeCode.json snipptes. The attachment worked for
me.
have fun!
mario
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/c7d603d3-fb57-479b-8a6a-91092f30d923%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
includeCode.json
Description: application/json

