Hi Felix

I think we might as well add an explicit variable that marks the preview
region. I'll push a commit shortly,

Best wishes

Jeremy


On Sat, Jun 20, 2015 at 9:23 AM, Felix Küppers <[email protected]>
wrote:

>  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 [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
> <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 [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/BLU436-SMTP37B7AB39FFD570F0AFBC50CEA30%40phx.gbl
> <https://groups.google.com/d/msgid/tiddlywikidev/BLU436-SMTP37B7AB39FFD570F0AFBC50CEA30%40phx.gbl?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Jeremy Ruston
mailto:[email protected]

-- 
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/CAPKKYJa9n_DoxBzb1gp3V%3D7FaE5k8GUE%3Dc2-cCjUnGNX35XTzA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to