[tw] Re: Method to hide/show bits of tiddler content. Other suggestions?
On 2 Jul., 03:39, twgrp matiasg...@gmail.com wrote: If (when?) they make it possible to import individual tiddlers from other tiddlyspaces then I imagine it should be straight forward though. (If password correct, then import tiddler x) There have been discussions about this in TWdev group or TiddlyWeb group but have no links at hand :) {{myWrapper{hideWhen readOnly some text }}} Interesting! Forgive my ignorance but how do I actually define this? In StyleSheet I write something like this, yes? - short version: == just copy paste this {{x{hideWhen readOnly some text }}} into a tiddler. make the tiddler public. log out. at my space some text it is hidden then. geeky version: == if you have a look at hideWhen plugin [1] you'll see: b) window.removeElementWhen = function(test,place) { window.hideWhenLastTest = test; c) if (test) { jQuery(place).empty() place.parentNode.removeChild(place); } }; merge(config.macros,{ hideWhen: { handler: function(place,macroName,params,wikifier,paramString,tiddler) { a) removeElementWhen( eval(paramString), place ); }}, === a) hideWhen: {handler: ...} calls removeElementWhen() b) removeElementWhen is defined globally and asks for the test variable and the place variable c) if test it true the containing element (place) will be removed. === if the following line is rendered by TW {{x{hideWhen readOnly some text }}} it produces the place if readOnly is false place- span class=x some text/span it readOnly is true it removes the place in the browsers DOM. So it is not hidden with CSS, it is removed. -m [1] http://mptw.tiddlyspot.com/#HideWhenPlugin -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To post to this group, send email to tiddlywiki@googlegroups.com. To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
[tw] Re: TW and (Alex Gorbatchev's) SyntaxHighlighter
Thank you! I need it just for documentation purpose in my own TW file. As I'm relatively new to TW, I didn't understand how to use your plugin; finally it worked by adding all the tiddlers tagged syntax in my TW file, and by adding the tag systemConfig to those that have this tag in your TiddlySpace. Can you confirm this? Cheers, Bertrand. Le samedi 30 juin 2012 16:05:32 UTC+2, PMario a écrit : On Jun 30, 1:28 am, Bertrand Goetzmann bertrand.goetzm...@gmail.com wrote: Is someone succeeded to integrate TW with Alex Gorbatchev's SyntaxHighlighter (http://alexgorbatchev.com/SyntaxHighlighter/) with a plugin, or in an other way? yup. Do you only need syntax highlighting for documentation purpose only [1] or do you want realtime syntax highlighting in edit mode [2] too? Do you need it with for TiddlySpace or a file TW? I think I do have File versions for sh [1] too. somewhere, may be ... :) [1] http://syntaxhighlighter.tiddlyspace.com/ [2] http://codemirror.tiddlyspace.com/ -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To view this discussion on the web visit https://groups.google.com/d/msg/tiddlywiki/-/TW1MJ0_CFksJ. To post to this group, send email to tiddlywiki@googlegroups.com. To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
[tw] Re: TW and (Alex Gorbatchev's) SyntaxHighlighter
On Jul 2, 12:07 pm, Bertrand Goetzmann bertrand.goetzm...@gmail.com wrote: Thank you! I need it just for documentation purpose in my own TW file. As I'm relatively new to TW, I didn't understand how to use your plugin; finally it worked by adding all the tiddlers tagged syntax in my TW file, and by adding the tag systemConfig to those that have this tag in your TiddlySpace. Can you confirm this? yes, If you have a look at the SyntaxHighlighterPlugin3Info [1] tiddler, there is a Needed: list tagged syntax heading, which lists the dependencies. If you need an other language to be highlighted, there is some info about this just above the Needed ... section. It would be nice, to get some feedback (from you), what would have been needed, to get you started faster. So I can add this info and improve the stuff. have fun! mario [1] http://syntaxhighlighter.tiddlyspace.com/#SyntaxHighlighterPlugin3Info -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To post to this group, send email to tiddlywiki@googlegroups.com. To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
[tw] Re: Template: Chess diagram
Where? Kind regards, Tobias. -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To view this discussion on the web visit https://groups.google.com/d/msg/tiddlywiki/-/D9bXKcBL3P8J. To post to this group, send email to tiddlywiki@googlegroups.com. To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
[tw] Re: [concept] Method to hide/show bits of tiddler content. Other suggestions?
Are there any suggestions how to hide and show *bits* of a tiddler? For example, I want to show this first half of this sentence but this second half only if some criteria is fulfilled. Last year, Brent Bartlett posted [1] a link to his SpoilerText plugin [2]. He created a formatter so that any text surrounded by %% was hidden by changing the background to black until moused over. The application was for a flashcard system, and I've used it to hide answers to study questions. He did this by just setting onmouseover and onmouseout to change the CSS background color attributes of the text. But, you could adapt this easily, testing for your criterion (perhaps readOnly or a successfully entered password?) and toggling display:none instead. [1] https://groups.google.com/forum/?fromgroups#!topic/tiddlywiki/Rf307bV45S8 [2] http://starjelly.net/portfolio/esperanto.html -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To view this discussion on the web visit https://groups.google.com/d/msg/tiddlywiki/-/jja7BcLgAesJ. To post to this group, send email to tiddlywiki@googlegroups.com. To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
[tw] Re: html javascript not working in TW?
Hi Mario - I'm working through your suggestions (intalled the #InlineJavaScript plugin, Firebug, done some debugging) and I've got a lot more to do, but sadly there was no easy win. I still get the same message. Feel free to ignore this, but if you have the time/inclination, here's the link to the code I'm trying to implement. http://code.google.com/p/jspos/ The string.match is not a function message comes out of the Lexer. What I've done is put the POSTagger Lexer functions, as well as the database variables, into the systemConfig-tagged tiddler (is its name important, and if so, in what way?). Then I'm implemeting the body code snippet as inline Javascript. Thanks, Andrew On Jun 30, 11:58 pm, PMario pmari...@gmail.com wrote: TiddlyWiki is more like an application, than an HTML page. Everything in TW is stored inside a tiddler. While tiddlers are only stored inside the HTML file, they are not automatically handeld by the browsers script engine. They are handled by the TW core program. So the handling is a bit different. One common html way to acitvate libraries and scripts is similar to this: html head titleSome title text/title a) link rel=stylesheet href=../lib/externalLibrary.css b) script src=../lib/externalLibrary.js/script ... c)/head body d)script externalLib.doSomething = function (externalGlobalVar) { // do some stuff here. } /script /body /html If you copy this snippet into a tiddler it will __not__ work and it shouldn't, because it doesn't fit TWs structure. In TW terms: (see markers above) a) is done with StyleSheet tiddlers, that are activated by the TW core. b) are library tiddlers tagged systemConfig. d) is a plugin call = The TW way would be similar to this: a) Copy the content of the CSS (only if it is _really_ needed) to a StyleSheetLibX tiddler. If it says eg: reset.css _don't_ use it. Only use library specific css. Call this tiddler from StyleSheet eg: StyleSheet contains [[StyleSheetLibX]] b) Copy the _content_ of the externalLibrary.js into a tiddler named externalLibrary.js and tag it systemConfig c) Go to tiddlytools.com and find InlineJavascriptPlugin [1] and import it to your test TW. Be sure to read and understand InlineJavascriptPluginInfo! tag it systemConfig. IinlineJavascriptPlugin activates the use of script/script tags inside a tiddler. This is super cool for fast prototyping, since you can use most of externalLibraries documentation. If you know how things work, you should create TW plugins. d) copy something similar to script externalLib.doSomething = function (externalGlobalVar) { // do some stuff here. } /script into a tiddler. __don't__ tag it systemConfig If the library documentation says something like: script src=bla bla externalLib.doSomething = function (externalGlobalVar) { // do some stuff here. } /script _remove_ the src=bla bla it is not needed with inline javascript plugin, if you did step a) to c) right. You can use script label=clickMe /script to create a button. This will make debugging easier. For debugging you should use FireBug browser AddOn for FireFox or the built in DevTools in Chrome and IE9+ If you would have added a link to your library of desire, the examples could be more prezise but imo it will give you some hints :) have fun! mario [1]http://www.tiddlytools.com/#InlineJavascriptPlugin -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To post to this group, send email to tiddlywiki@googlegroups.com. To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
[tw] Re: limiting search by tag
That works great. Is there a wild character one can use? axel -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To view this discussion on the web visit https://groups.google.com/d/msg/tiddlywiki/-/SP3CS0xq2nwJ. To post to this group, send email to tiddlywiki@googlegroups.com. To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
[tw] Re: html javascript not working in TW?
On Jul 3, 12:30 am, tejjyid andrew.x.w...@gmail.com wrote: http://code.google.com/p/jspos/ The string.match is not a function message comes out of the Lexer. What I've done is put the POSTagger Lexer functions, as well as the database variables, into the systemConfig-tagged tiddler (is its name important, and if so, in what way?). Then I'm implemeting the body code snippet as inline Javascript. systemConfig tagged tiddlers are ordered by name and started in that order by the TW core. So aa.js has higher priority than bb.js. Did you have a look into sample.html with a text editor? it's quite similar to my general description. script type=text/javascript src=lexer.js/script script type=text/javascript src=lexicon.js_/script script type=text/javascript src=POSTagger.js/script If you name your tiddlers Lexer.js, Lexicon.js_ and POSTagger.js they will be started in the right order. Uppercase has higher priority than lowercase. I'll have a closer look but not now :) -m -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To post to this group, send email to tiddlywiki@googlegroups.com. To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.