Yakov,

On Monday, February 15, 2016 at 5:03:45 AM UTC+8, Yakov wrote:
>
> Hi Vincent,
>
>  
>
>
> 1. Create a tiddler with a short paragraph (shorter than a line), an empty 
> line and another paragraph (line after 2 linebreaks). Go to the view mode, 
> click the first paragraph, go to the its end. Press right: what I get is an 
> *extra* block to the right from the first paragraph, then I press right 
> again, I get the empty line block (which is ok), then the second paragraph. 
> Interestingly enough, if I have a paragraph, a linebreak and a list item 
> (only one linebreak after the paragraph before the "*" symbol), I get this 
> "extra block", too; however, list items don't generate this "extra block" 
> (which can be seen if tiddler contains a list item and then a paragraph). 
> Another aspect: empty lines don't generate the "extra block".
>
>
> The "extra block" corresponds to a BR element in the DOM tree. A paragraph 
> is usually followed by a BR, therefore you see that extra block. An empty 
> line is nothing but a BR, so that edit box for an empty line is already 
> that "extra box" itself, and that's why you don't get another extra box 
> again. Anything that's not followed by a BR does not give you this extra 
> box.
>  
> I am still thinking of a good way to handle those BR's.....
>
> Well, I think a BR element should generate an edit block only if it is 
> followed by another BR, and if changes are to be applied the text should be 
> inserted after it [the first one].
>

That is a good idea, but what confuses me now is the seemingly 
unpredictable appearance/disappearance of the BR's immediately before/after 
a block element...
 

>  
>
>
> 2. In this case, I would expect "down" arrow to act like the "left" arrow. 
> Well, not exactly in the same manner, but surely "down" should also bring 
> me to the next block.
>
>
> The down and up arrows are not implemented because I have not yet figured 
> out how to move the cursor in a visually consistent way. I mean when I 
> press the up arrow I do expect to see the cursor go straight above instead 
> of to the very left of the element above, don't I?
>  
>
> That's a fair note. But I think this is not to be taken into account until 
> the edit-area+preview pair is substituted with a WYSIWYGish edit area.
>

I think you are right about this. Thanks!
 

> Once that is done, you can calculate the X coordinate of the cursor, 
> predict which coordinate it will get if it is place after the first letter 
> of the line, after the second etc and decide which variant is closest to 
> the current, and act accordingly. Alternatively, you can implement the 
> behaviour of office-like editors: they find the position whic
> ...


The two references are very helpful, thanks a lot!

Have fun!
Vincent 

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a118fd7f-5511-4fba-8706-754350587be8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to