Hi Yaisog

All widgets are parsed by the HTML element parser, and it isn't currently 
possible for a specific widget to customise the parsing process. Instead, you 
can create a parser that implements a new wikitext construction with the syntax 
that you want (but that doesn't clash with the existing HTML element parser), 
and then generates an instance of your widget.

Best wishes

Jeremy

--
Jeremy Ruston
[email protected]
https://jermolene.com

> On 31 Aug 2019, at 10:50, Yaisog Bonegnasher <[email protected]> wrote:
> 
> 
> Hi,
> does anyone know of a way to have the content in a (custom) widget always 
> rendered in block mode? If at all possible, I would like to avoid having to 
> insert two line breaks after the widget's opening element.
> 
> Background: I'm using a custom widget to insert <div>s with the attribute 
> "tabindex=-1" and an identifier attribute around sections of wikitext. I can 
> the use the tm-focus-selector message to scroll the section into view on a 
> button click. This way I can set up a tiddler ToC for long tiddlers that can 
> navigate to individual sections. It's the next best thing to section links in 
> TWC for me (if it were combined with tm-navigate).
> 
> <$sec title="Section Title">
> Some wikitext, usually in the form of lists.
> </$sec>
> 
> The title attribute is rendered as an H2, and the wikitext must be parsed in 
> block mode in order for the lists to work. Currently, I need to insert an 
> extra line break to achieve that, which reduces the readability of the 
> wikitext in tiddlers with many sections.
> 
> Regards,
> Yaisog
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/f9e87640-7960-4fcf-9002-2b65db7548b8%40googlegroups.com.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/7019BB5B-4378-465C-8BB2-3EBB1BE86289%40gmail.com.

Reply via email to