Servus Mario,

Walking up the dom-node tree and checking for a class is a nice idea. I
initially wanted to extract the information from the widget tree but
your idea is way easier.
If there is no better solution, I'll go with your suggestion! Thanks!

-Felix



On 20.06.2015 00:56, PMario wrote:
> Hi Felix,
>
> I think a widget doesn't know, if it is in preview mode, because
> preview mode is nothing special. It's a button with a reveal widget.
>
> I did a short test:
>
> <$edit tiddler="xx"> ... which produces the textarea
>
> creates this DOM:
>
> <div class="tc-tiddler-preview-preview">
>   <p>
>     <textarea style="height: 100px;">Type the text for the tiddler
> 'xx'</textarea>
>   </p>
> </div>
>
> -m
>
> So imo you need to walk up 2 parent nodes, and check for class
> tc-tiddler-preview-preview. The mechanism is a bit fragile, because it
> depends on the class, but imo it won't change any time soon.
>
> -m
> -- 
> 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 tiddlywikidev+unsubscr...@googlegroups.com
> <mailto:tiddlywikidev+unsubscr...@googlegroups.com>.
> To post to this group, send email to tiddlywikidev@googlegroups.com
> <mailto:tiddlywikidev@googlegroups.com>.
> 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/a3b7dbd0-4d0b-4c67-b0f2-d0fc74965858%40googlegroups.com
> <https://groups.google.com/d/msgid/tiddlywikidev/a3b7dbd0-4d0b-4c67-b0f2-d0fc74965858%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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
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/BLU436-SMTP37B7AB39FFD570F0AFBC50CEA30%40phx.gbl.
For more options, visit https://groups.google.com/d/optout.

Reply via email to