Andreas,

Thanks a lot for the reply. After reading your suggestions, I went through 
the element.js and table.js files again and got some ideas to try. I will 
start testing those ideas and hopefully make a decision soon. Thanks again 
for the help.

Have fun!
Vincent

On Monday, May 4, 2015 at 8:43:23 PM UTC+8, Andreas Hahn wrote:
>
>  Hi Vincent,
>
> there is no such thing as a table widget, tables are treated as normal 
> HTML-elements, thus are handled by the $element widget. In TW5, everything 
> is handled by either parser-rules or widgets, when it comes to translating 
> wikitext to html. Therefore, if you want to hijack every table generated by 
> wikitext, you can do so, by tapping into the parser rules to attach your 
> own widget around a table for instance, so you can do your calculations 
> when they are rendered.
>
> I am however uncertain how difficult it will be to add your functionality, 
> without modifying any of the existing parser-rules, so you might end up 
> having to implement your own "table" widget, in order for users to benefit 
> from the functionality.
>
> /Andreas
>
>
> Am 03.05.2015 um 17:03 schrieb Vincent Yeh:
>  
> Hi Jeremy,
>
> As you may know I am working on migrating my *twve* plugins to TW5, and 
> the first one I want to do is the simple calculator twve.tcalc. I went 
> through the document and some of the plugin files, and realized how to 
> create a plugin of my own. Thanks a lot to you and all the plugin authors 
> for the nice and clear comments between the codes. In the mean time, I also 
> realized that the available information is all about creating a custom 
> widget. This is, however, different from what I needed, my calculator does 
> not create tables but work with existing ones.
>
> The current way it works with TW2 is to hijack the refreshing function and 
> does the calculations after the table is refreshed by TiddlyWiki. I am 
> thinking of doing the same way, so started to look for the table widget 
> files, hoping to find a way to hijack it somehow. The closest ones I found 
> were the *element.js* widget file and the *table.js* rules file. I did 
> not find a table widget file. Is there such a file in TW5? Or I should just 
> try the trick with the refreshing function in element.js?
>  -- 
> You received this message because you are subscribed to the Google Groups 
> "TiddlyWikiDev" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected] 
> <javascript:>.
> Visit this group at http://groups.google.com/group/tiddlywikidev.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywikidev/26fbc204-1bd5-41f8-b8a5-f338d18cb99c%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywikidev/26fbc204-1bd5-41f8-b8a5-f338d18cb99c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" 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/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/48e99081-975f-4307-a82d-e8c87fc37f5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to