Let's consider a simple formatter: the LineBreakPlugin v0.1 (by axs,
more recent version is in [1]):

config.formatters.splice(config.formatters.findByField("name","lineBreak"),
0,{
        name: 'doubleLineBreak',
        match: '\\n{2,}',
        handler:function(w){
        
createTiddlyElement(w.output,'div',null,'multipleLinebreak').innerHTML=" ";
        }
});
setStylesheet(store.getTiddlerText('LineBreakPlugin##Style'),'MultipleLineBreak');

Ok, basically we have a name, a match and a handler for each
formatter. What looks unclear for me is that how the handler is
applied. For each tiddler we have tiddler.text. Now, are the
formatters applied sequentially? If so, what is the intermediate
result (after the first formatter is applied)? I guess it couldn't be
just test since we have that createTiddlyElement which should create
some DOM element (right?). At the same time, it couldn't be already
DOM (can it?) since we still have text to be formatted.

And in which .js part of the tw core [2] those formatters are applied?

[1] http://axs.tiddlyspot.com/#LineBreakPlugin
[2] https://github.com/TiddlyWiki/tiddlywiki/tree/master/js

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywikidev?hl=en.

Reply via email to