Hi, Yakov,

On Thursday, March 14, 2013 5:31:09 AM UTC+8, Yakov wrote:
>
> Hi Vincent,
>
> glad the development goes on. Could you specify what bug you was talking 
> about in the WYSIWYG discussion? The "cursor in the preview" one?
>
> The bug was fixed lately so no need to worry about it. However, for your 
information I'll put some words here to explain. In TWted the editbox 
adjusts its height as the user is typing, and, for reasons unknown to me, 
the adjustment requires (for some browsers) first setting its height to 0 
to get the correct height of its content (see 
here<http://twtable.tiddlyspace.com/#%5B%5BDynamic%20TextArea%20Height%5D%5D>if 
interested). In a recent coding time I accidentally removed some of the 
codes to set the correct height back, resulting in a zero-height editbox 
once I started to type. But the editbox still had the focus and received 
all the keystrokes, and the previewer was still working, so it looked like 
the previewer was responding to my typing, that gave me a feeling of W-G.
 

> First, I'd like to suggest some things which are not directly connected 
> with the development:
>
> * how about adding a simple startup message in the repository [1]? Instead 
> of the default GettingStarted tiddler, add a breif intro about the plugins 
> and links to them, so you don't need to attach the links each time and a 
> visitor doesn't need to search
>
* it seems it's time to update the Descrition slices in both 
> TWted/TWted.min and TWtid/TWtid.min (those are no longer about tables only)
>  
>
* I think it's better to specify what version of TWtid TWted needs (the 
> same, or not below, or.. you may specify this in the "Needs to have" slice)
> * the metadata table of the plugins being cut (see the screenshot 1) don't 
> make them look better; in addition, when one tries to grab the scrollbar, 
> he or she mouseovers it and the table jumps into the edit mode, so 
> scrollbar avoids being cought :) (see the screeshots 2-3, red dot is an 
> approximate posision of the cursor)
> ** in fact, I didn't get how to avoid this cutting and would like to know; 
> as I pointed before, such behavior shouldn't be default
>
> Those are good suggestions. After releasing 1.5.1 I shall spend some time 
on the documentation.
 

> Then some notes about the new version. In fact v1.5.0 got very buggy.
>
> 0. Online version works (there are some details, but that's not that 
> important for now)
> 1. When I launch a TW v2.6.6 with TWtid.min/TWted.min v1.5.0, I get a 
> blank screen (Opera 12.14, win7 x64)
>
2. When I launch a TW v2.6.6 with TWtid.min v1.5.0 with no TWted, the same 
> story
> 3. The same story in FF 19 (both variants)
> 4. In another testing TW (2.6.5, with SharedTiddlersPlugin 1.5.0 -- when I 
> disable it, I get blank screen) things "work", but there are numerous bugs 
> (no backstage, C/E buttons positioned in wrong places so that no element 
> can be actually edited, encoding problems with non-latin letters after 
> saving/loading...)
>
> Honestly I did not test 1.5.0 with Opera and FF so I didn't know about 
these. The not-yet-released 1.5.1 does not have such problems in my system. 
Maybe I fixed it somehow without knowing it? We'll see this soon.

Regarding the "WYSIWYG": aside the cursor, I can see that a link is 
> previewed as a link when the cursor is outside its tiddlytext, previewed as 
> [|[text|target]] when I get between "[[" or "]]" (!!) and parts of the 
> "text" depending on the position otherwise (!). The (!!) part is very 
> interesting behavior for a "WYSIWIG-like" way of editing, the (!), in 
> contrast, is rather inconvenient.
>

I noticed this behavior. It was caused by the "fake cursor", default to the 
vertical bar (|), that I inserted to the caret position to mimic a cursor 
in the previewer. This certainly affects the wikilinks because the vertical 
bar is used to separate the label and URL of the link. I understand this 
fake cursor must be changed to something else, but I haven't found a better 
one yet. Any suggestions?
 

>
> The last note for today is this: can the plugin for inline editing be 
> based on hijacking the wikifier [2] and formatters [3] (or only 
> formatters)? It seems (although I don't understand the alrogrythm well) 
> that hijacking 
>
> Wikifier.prototype.outputText
>
> can help with editing plain text..
>

Thanks for the note. Actually I tried this way when I was writing the 
grandpa TableEditor, but soon gave up and turned to hijacking 
refreshTiddler(). I couldn't quite understand the formatters, but it seemed 
to me that I would need to abandon the original and rewrite a new one to 
replace it (Am I right about this?). Hijacking the refreshTiddler() is easy 
to implement but the cost is "double rendering": table cells with 
multi-lined content are rendered twice, first by the system table 
formatter, then the table renderer in TWtid. Currently it doesn't seem to 
be a problem because it doesn't delay too much. However, to really avoid 
this I would suggest the table formatter to have a cell handler, which the 
TWtid can hijack to render the table cells with multi-lined content before 
they get rendered by the system formatter.

As for editing plain text in view mode, I am not sure hijacking the 
wikifier or formatter would help, because view mode editing is to catch 
some thing *after* it is rendered while hijacking the wikifier/formatter is 
to catch some thing *before* it is rendered. The main concern of view mode 
editing is not how it is rendered but how to find the corresponding 
wikitext after it is rendered. The problem I see is "plain text does not 
have a block element (such as <P> or <DIV>) and signature". TWted needs a 
block element and its signature to locate the correct wikitext for view 
mode editing. It relies on block elements because

   1. a block element can have a clearly defined index number* in a 
   rendered page, and
   2. block elements have their "signature" in the wiki text.
      1. For example, a list item is one line of text that starts with 
      either (*) or (#), a heading is one line of text starting with (!), a 
table 
      is defined by consecutive lines of text that start with (|), etc.
   
With those signatures and the index number of the block element, TWted can 
correctly locate the corresponding wiki text. See the [[How?]] section in 
the to-be-finished 
document<http://twtable.tiddlyspace.com/#%5B%5BEditing%20wiki%20text%20in%20the%20view%20mode%5D%5D>if
 interested.

This approach works for block elements but fails on plain text in a 
tiddler. As mentioned above, plain text does not have a block element and 
plain text does not have a signature. It's just plain text. The solution 
implemented in TWted 1.5.1 is to "locate the block elements before and 
after the plain text", get the wiki text in between to edit. It works for a 
piece of plain text that does have one block element before and one after, 
such as a section text that is preceded by its own heading and followed by 
another heading (or any other kinds of block elements). I am left to deal 
with the situations with missing block elements, either one or both. Should 
be done soon.

* The index number used in TWted is the "order of appearance" of a block 
element "within its own type within the same tiddler". 

Thanks for your time and suggestions.

Have fun!
Vincent


> Best regards,
> Yakov.
>
> [1] http://twtable.tiddlyspace.com/
> [2] https://github.com/TiddlyWiki/tiddlywiki/blob/master/js/Wikifier.js
> [3] https://github.com/TiddlyWiki/tiddlywiki/blob/master/js/Formatter.js ,
>     
> https://github.com/TiddlyWiki/tiddlywiki/blob/master/js/FormatterHelpers.js
>
>  
>>
>>> Am 09.02.2013 15:25 schrieb "Vincent Yeh" <qmo....@gmail.com>:
>>>
>>>> Forgot to include the download links:
>>>>
>>>>    - TWtid v1.5.0: http://twtable.tiddlyspace.com/#TWtid.min 
>>>>    - TWted v1.5.0: http://twtable.tiddlyspace.com/#TWted.min
>>>>    - TWtcalc v0.7.7: http://twtable.tiddlyspace.com/#TWtcalc.min 
>>>>
>>>> Have Fun!
>>>> Vincent
>>>>
>>>> On Saturday, February 9, 2013 10:21:03 PM UTC+8, Vincent Yeh wrote:
>>>>>
>>>>> Interested in editing your tiddler in the view mode in TiddlyWiki? Try 
>>>>> this view mode editor plugin TWted (requires TWtid).
>>>>>
>>>>> Interested in a calculator that supports (partially for now) Excel 
>>>>> syntax in Tiddlywiki? Try the simple calculator plugin TWtcalc (requires 
>>>>> TWtid).
>>>>>
>>>>> These plugins are under active development. You are very welcome to 
>>>>> give comments/suggestions/bug reports. :-)
>>>>>
>>>>> The first versions of these plugins were TableEditor and 
>>>>> TableCalculator, released in 2012/06/24, that only supported table 
>>>>> editing 
>>>>> in the view mode. Later they were extended constantly and then evolved 
>>>>> into 
>>>>> TWtable, TWted and TWtcalc (released 2012/10/19), still only supported 
>>>>> table editing. Recently they were further extended to support view mode 
>>>>> editing on most of the block elements (see below) in a tiddler, much more 
>>>>> than just a table editor, so I decided to start a new thread for these 
>>>>> plugins. You can find their earlier history in the old thread "Inline 
>>>>> Editing of Tables" started by pepebe.
>>>>>
>>>>>
>>>>>    - TWtid v1.5.0 — The basis of the view mode tiddler editor TWted and 
>>>>>    simple calculator TWtcalc, including a table renderer.
>>>>>       - Generalized the codes from TWtable 1.4.6, which works for 
>>>>>       tables only, to support most kinds of block elements, see 
>>>>> descriptions for 
>>>>>       TWted below. 
>>>>>       - The included *table renderer* supports
>>>>>          - scrolling for large tables,
>>>>>          - multi-lined cell content (you can have a list in a table 
>>>>>          cell), 
>>>>>          - synchronization among all copies (transcluded and 
>>>>>          non-transcluded).
>>>>>       - See TWtid for more details. 
>>>>>    - TWted v1.5.0 — The view mode tiddler editor.
>>>>>       - Edit block elements either in view mode (default) or in edit 
>>>>>       mode (option description "Active in view mode")
>>>>>          - If in view mode, the default edit box remains the same;
>>>>>          - if in edit mode, the view mode remains for viewing only.
>>>>>             - The system default edit box can be brought up by double 
>>>>>             clicking in a no-element area (note that some elements are 
>>>>> much wider than 
>>>>>             their content). 
>>>>>          - Works on most of the block elements:
>>>>>          - *Tables* —
>>>>>             - easy access to cell content for editing purposes 
>>>>>             - insertion/deletion of rows/columns
>>>>>             - copy/cut/paste the cells/rows/columns
>>>>>          - *Lists* — both kinds, * and # (corresponding to <UL> and 
>>>>>          <OL>), as many levels as TiddlyWiki supports; 
>>>>>          - *Headers* — ! ~ !!!!!!, corresponding to H1 ~ H6;
>>>>>          - *Blockquotes* — three levels supported: >, >> and >>>; 
>>>>>          - *Blockexamples* — lines of text enclosed by two <<<;
>>>>>          - *Preformatted blocks* — lines of text enclosed by two 
>>>>>          triple-braces. 
>>>>>       - A simple previewer to see the output as you are typing.
>>>>>          - Option txtTWtedPreviewOpacity to change opacity of the 
>>>>>          previewer. Default to 0.9.
>>>>>          - Option txtTWtedPreviewCaret to specify the caret symbol in 
>>>>>          the previewer. Default to the vertical line (|). 
>>>>>       - Edit tiddler title.
>>>>>       - Two options offering three levels of automation in the 
>>>>>       editing behavior:
>>>>>          - Two options:
>>>>>             - chkTWtedCatTheMouse — Activate/Deactivate edit mode 
>>>>>             with mouse motion.
>>>>>             - chkTWtedNoClick — Edit the cell content without 
>>>>>             clicking it.
>>>>>          - Three levels of automation:
>>>>>             - Manual: set both options to false. Click the 'E' button 
>>>>>             to start/stop editing the closest block element.
>>>>>             - Half automated: set the 1st option to true and 2nd to 
>>>>>             false. In this level a table enters edit mode automatically 
>>>>> when mouse is 
>>>>>             hovering over it while other block elements remain manual. 
>>>>> 'E' button is 
>>>>>             hidden, need to lick within the block element (or the table 
>>>>> cell) to edit. 
>>>>>             - Automated: set both options to true. Move the mouse 
>>>>>             over a block element or a table cell to edit. (Warning: this 
>>>>> can be 
>>>>>             annoying in some cases!)
>>>>>          - Keyboard navigation within the same type of elements.
>>>>>          - Works with headers, list items, blockquotes and preformats.
>>>>>          - Move list items, only list items for now, with 
>>>>>          Ctrl-up/down keys. This, however, only works within the same 
>>>>> level at this 
>>>>>          moment, moving items across different levels will be supported 
>>>>> in the 
>>>>>          future release. 
>>>>>       - Tables are synchronized between transcluded and 
>>>>>       non-transcluded copies, other block elements are not yet.
>>>>>       - See TWted for more details. 
>>>>>    - TWtcalc v0.7.7 — A simple calculator for TiddlyWiki.
>>>>>       - Calculates over table cells. For example, if one puts =A1+A2 in 
>>>>>       the table cell A3, the content of A3 will be the sum of the 
>>>>>       numerical values in table cells A1 and A2. 
>>>>>       - Supports syntax similar to OpenOffice calc or Microsoft Excel.
>>>>>       - Automatically adjusts cell reference upon copy-and-pasting.
>>>>>       - Supports user defined functions written in Javascript. See 
>>>>> TWtcalc--Defining 
>>>>>       your own functions for details. 
>>>>>       - See TWtcalc for a list of predefined functions and further 
>>>>>       details.
>>>>>    
>>>>> -- 
>>>> 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 tiddlywiki+...@googlegroups.com.
>>>> To post to this group, send email to tiddl...@googlegroups.com.
>>>> Visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>  
>>>>  
>>>>
>>>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to