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 [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/a3b7dbd0-4d0b-4c67-b0f2-d0fc74965858%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to