Hi Yoann
On Mon, Nov 11, 2013 at 1:52 AM, Yoann Babel <[email protected]> wrote:
> If I insert "<$edit-bitmap>" in a Tiddler :
>
That's probably not a very useful thing to do. By default, if you don't
specify a "tiddler" attribute, the edit-bitmap widget will display a canvas
for editing the current tiddler, which is of course the tiddler containing
the edit-bitmap widget, thus overwriting it.
>
> 1. when I validate the tiddler, I have a blank bitmap *editor*appearing
> (and not a blank image since I'm in a view mode)
>
> Your displaying the tiddler in view mode, but you've asked for an editor
to appear and so it does.
>
> 1. if I re-edit my tiddler, without modifying the image, I get
> <$edit-bitmap> in the body
> 2. if I modify the image (in the view mode) I have now an image (not
> editable) in the view mode, and the field "type: image/png" is added
> 3. if I go in edit mode again, I now have the bitmap editor. No access
> to the original text is now ever possible.
>
> Basically, a tiddler has a type that determines how its content is
treated. A tiddler can be an image, or wikitext, but not both. (Any more
than a file can be both a .txt file and a .jpeg image).
The edit-bitmap widget will convert the target tiddler to a bitmap when you
make a change, which is what you're seeing.
>
> 1. If I remove the "type : image/png" the tiddler content is now an
> encoded raw Image ... instead of my original "<$edit-bitmap>"
>
> Yes, you've lost the edit-bitmap widget invocation because you overwrote
the tiddler in which it was written.
> The edit-bitmap "replace" the whole tiddler. Which is ... disturbing. It
> means I cannot insert some text before or after the widget call.
>
The way to mix images and text is to transclude the image where you need it
in the wikitext. For example:
This is a picture of a cat: {{Motovun Jack.jpg}}
> Then I discovered that inserting "type:image/png" also tigger the
> edit-bitmap widget on an empty tiddler.
>
Yes, you've changed the type of the tiddler to make it be a bitmap, and so
TW5 gives you a bitmap editor.
> I'm a bit confused. Don't know if I'm missusing it, or if I should add an
> issue to TW5.
>
> I expect to have access to the original text of my tiddler ... whether I
> have and edit-bitmap widget or not. Because, if I can't, how can I change
> my tiddler content ?
> I can't even add text after <$edit-bitmap>.
>
Does the explanation above make sense?
> BTW, where is the association between type:image/png and
> edit-bitmap-widget specified ? I was unable to find the mechanisme binding
> them.
>
The edit widget chooses the edit-bitmap or edit-text widget depending on
the type of the target tiddler.
>
> Maybe I should be using a macro instead of a widget ? but still, the edit
> behavior is weird and not really consistent.
>
It is consistent once you've understood that a tiddler has a type that
makes it *one* of wikitext, image, etc.
Best wishes
Jeremy
>
> --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
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.
For more options, visit https://groups.google.com/groups/opt_out.