Just Dreaming - click to edit at Cursor

441 views
Skip to first unread message

TonyM

unread,
Sep 28, 2017, 12:14:42 AM9/28/17
to TiddlyWiki
Folks,

I am working on making notes taking in class really easy, and I noticed something I have come to accept with tiddlywiki that would be great to fix. Perhaps its not possible but I thought I would ask.

When you have a long tiddler you are writing it is nice to save and view it in view mode, but it is a real pain returning to somewhere in the text to continue editing. There was a click to edit feature in TWC where clicking in the content would allow you to edit the content, but It would be really good if once you clicked at a point on the the tiddler it would open for edit with the cursor placed in the text where you clicked (or Double Clicked, Ctrl-Clicked).

I have recently created a Tag that once added to a code tiddler Displays text un-wikified in view template at bottom of tiddlers tagged ShowCode. The same would be good for developing if we could click into that to edit and move the cursor. Alternatively we could have a view tiddler toolbar item (to show text/code) un processed we could click into.

I imagine what I dream of is difficult or impossible but I think it would make a big difference to tiddlywiki usability.

  • What do you think?
  • Any ideas how?
  • Unfortunately I do not have the skills to do this
Tony

@TiddlyTweeter

unread,
Sep 28, 2017, 10:16:51 AM9/28/17
to TiddlyWiki
Ciao TonyM

The TW editor is like in a "different mode" than a lot of the rest of TW. But its a hell of a lot better than it was even a year ago. "Marking the spot", where your cursor last was on save ("remember my position") has a lot of merit for LONG documents. I have no idea if its possible to have that re-entrant.

FWIW, my biggest problem with the editor on long documents is "judder" ... it updates itself but then doesn't quite know how long it is and can start to jiggle.

Best wishes
Josiah

PMario

unread,
Sep 28, 2017, 11:07:27 AM9/28/17
to TiddlyWiki
On Thursday, September 28, 2017 at 6:14:42 AM UTC+2, TonyM wrote:
There was a click to edit feature in TWC where clicking in the content would allow you to edit the content,

This behaviour was removed by design. For "casual" visitors of your page it created a very unexpected behaviour. eg: They wanted to "double-click mark content" to copy paste it. When the editor opened, they thought, they broke the internet / web page ;)
 
but It would be really good if once you clicked at a point on the the tiddler it would open for edit with the cursor placed in the text where you clicked (or Double Clicked, Ctrl-Clicked).

The rendered HTML text has no knowledge where it came from eg:

Some text

{{myText}}

may be rendered as

Some text

Some more text

So what should clicking Some more text, do now? ...

Either open the tiddler named: myText or edit the tiddler which is actually open? ... Whatever we implement will be wrong. ...

So it'll need to be adjustable or ctrl-Dbl-Click vs Alt-Dbl-Click .... or what ever.

... BUT ...

The bigger problem is. Some more text  doesn't know, that it belongs to myText tiddler.
The possibility of transclusions, lists and so on, makes it really hard to calculate the position in the source  text, based on the rendered cursor position.

"really hard" as in:

  • We need to extend the functionality of the "wikitext parser", that it stores source positions of every element in TWs internal structure: the "parse-tree".
  • The parse-tree is converted into the widget-tree, which also needs to deal with this new info now. ...
  • The renderer, which uses the widget-tree needs to write this info into the html-output.
  • The navigator-widget finally has to deal with the new "double clicks" to open the corresponding tiddler + selecting the right position in the source code.
Which basically means "rewriting" most of the parsing -> rendering pipeline. ..

IMO it still is an interesting idea, since we could make some other improvements along the way. Eg store the tiddler content in a different format and partially convert TW syntax -> markdown -> TW syntax.  ....

I have recently created a Tag that once added to a code tiddler Displays text un-wikified in view template at bottom of tiddlers tagged ShowCode. The same would be good for developing if we could click into that to edit and move the cursor. Alternatively we could have a view tiddler toolbar item (to show text/code) un processed we could click into.

I imagine what I dream of is difficult or impossible but I think it would make a big difference to tiddlywiki usability.

  • What do you think?
It's doable and has some advantages ... It just isn't easy ;)

  • Any ideas how?
See above.
 
have fun!
mario

Mark S.

unread,
Sep 28, 2017, 1:06:02 PM9/28/17
to TiddlyWiki
Danielo has a double-click-to-edit plugin. I tend to leave it off because so often I want to double-click inside a field to select everything. I never released how often I did this until I installed the plugin.

The somewhat obvious solution to the "click to edit at cursor" problem would be to do everything the "TW5 way" (tm). That is, make sure your text never exceeds a few paragraphs. That way you can always quickly get back to your text.

I can imagine making an interface which displays a series of lines as input fields (each line would represent either a tiddler or a tiddler field). Small buttons would let you work on a line, insert new lines, split a line. This would provide cursor-at-line resolution. All of your text except the working line would be rendered for viewing so you'd have an almost wysiwyg experience.

Mark

Sylvain Naudin

unread,
Sep 28, 2017, 1:09:41 PM9/28/17
to TiddlyWiki
Hi Tony,

I agree with you about editing long text, it will be a good with standard text (not transclude and other TW tricks).

I've see in this groups another approach, that opening a new window tiddler to contribute in edit mode, and see regular result on river story.
Or you have Matt plugin to edit close to the river.
But it's steal difficult with wikitext format or own macro code sometimes.

I'll love to see an edit mode but directly in render mode, like some JS script on html5. It will not work with transclude, just for adding/delete text (and basic like bold) in the current tiddler.

Regards,
Sylvain

@TiddlyTweeter

unread,
Sep 28, 2017, 1:17:18 PM9/28/17
to TiddlyWiki
Mark S. wrote:
Danielo has a double-click-to-edit plugin.

That is a great gadget. Very robust & useful. Design wise it allows you to switch OFF permanently all excess buttons.
 
J.

@TiddlyTweeter

unread,
Sep 28, 2017, 1:38:52 PM9/28/17
to tiddl...@googlegroups.com
Isn't this issue partly about that TW's editor is not WYSIWYG?

There is a mindset that code and "surface" differ. IF it were WYSIWYG it might be different.

Work like Telmiger's on ToDoNow bring the already existing differential metaphors of editing nearer the surface. Its not so difficult, it seems, to access the editor in context.

This comment is not exactly addressing the initial question BUT I think its relevant to it in the senses of "mark my last editing place" and "open the editor here, on click" are more than just a tech issue. They are a fundamental usage concept, I think.

Just thoughts
Josiah

@TiddlyTweeter

unread,
Sep 28, 2017, 1:46:28 PM9/28/17
to TiddlyWiki
Ciao Sylvain


I'll love to see an edit mode but directly in render mode

You mean "WYSIWYG" editing (even if with limits)?

Best wishes
Josiah


Mark S.

unread,
Sep 28, 2017, 2:08:06 PM9/28/17
to TiddlyWiki
Isn't this issue partly about that TW's editor is not WYSIWYG?

MediaWikia (and thus Wikipedia) is about to get a visual editor. Which means that soon there will be an expectation that anything calling itself a wiki will also have WYSIWYG.

Mark

@TiddlyTweeter

unread,
Sep 28, 2017, 2:26:34 PM9/28/17
to TiddlyWiki
Ciao Mark

When I arrived in TW I was well used to TinyMCE & CKEditor WYSIWYG editors. Over the last year I've grown to like WikiText & markup--I never used "such weird things" before. At the start I thought they were a totally ridiculous anachronism. But they HAVE efficiency & I have grown to like them. But they are NOT primarily visual. WYSIWYG editing I think is closer to surface and has a lot going for it. All this has existential implications :-).

Best wishes
Josiah

TonyM

unread,
Sep 28, 2017, 6:53:36 PM9/28/17
to TiddlyWiki
Folks,

Clearly you have all being responding while I sleep here in Sydney. I really appreciate your feedback and ideas. I see why It is a challenge that I did not think trough too much, just defined the desire.

FYI, I was in my Big Data course last night with my laptop, typing in notes as we worked, using bash, Vi, AWS, PDF files with commands and more. Tiddlywiki is brilliant at providing a tool for this but during a class you don't have time to excise pieces of text to simplify. This is why a long tiddler developed, and I needed to return to it often, usually to the bottom but not always, it is this transition between displayed tiddler and editing a tiddler that is attention/cognitively demanding.especially when you want to edit something earlier in the text.

Leaving the tiddler in edit/Preview mode along with the Save and Keep open by Thomas Elmiger (that looses the cursor place) but
Birthe says Using the keyboard shortcut for saving, the tiddler stays in edit mode and you can keep writing at exactly the same point. Nice when writing longer text. (eh tiddlers and long text......]
I may combine this with tiddlers bar so I can keep the long tiddler open but out of the way.

Two thoughts that may inspire you further after reading all your comments.
  1. If we could toggle a view mode, that shows the tiddler un wikified, a click to edit at cursor would be much simpler and accurate, you could even have it only work when in view mode reducing the problems with stray clicks.
  2. Perhaps I could be using preview mode a little more, click to edit is not so difficult then, but I could imagine in preview clicking in the right preview could highlight the position in the left (edit panel)
    I understand that clicking on a transcluded item could only put the cursor near the line that does the transcluding.


Of course as Mario points out, the work, given the architecture of tiddlywiki may be difficult, and all your efforts better directed, However we are a creative bunch and expect we can find a way to a solution that supports editing and returning to mid to large tiddlers.


Regards

Tony

PMario

unread,
Sep 28, 2017, 7:52:06 PM9/28/17
to TiddlyWiki
On Friday, September 29, 2017 at 12:53:36 AM UTC+2, TonyM wrote:
Two thoughts that may inspire you further after reading all your comments.
  1. If we could toggle a view mode, that shows the tiddler un wikified, a click to edit at cursor would be much simpler and accurate, you could even have it only work when in view mode reducing the problems with stray clicks.
Nice idea. IMO would be much simpler to implement.
 

Of course as Mario points out, the work, given the architecture of tiddlywiki may be difficult, and all your efforts better directed, However we are a creative bunch and expect we can find a way to a solution that supports editing and returning to mid to large tiddlers.


At the moment I'm experimenting with a "form based" view. It basically provides "in place editing" of fields. I'm creating a specific "solution", requested in a differnt thread. Just to see, which parts of the code are duplicated for the different views and therefore need to be more generic, to reuse the code. ...

As you write: >>During the course you don't have time to excise pieces of text to simplify.<<  ... This means for me the UI must be much simpler and much "faster". No need to have "Edit Tiddler" or "Done" buttons. ... For me this means ..

1 tiddler per note-element is automatically created.

A note-element could be:

 - Block of wikitext (default)
 - Block of text/plain .... eg: bash commands
 - Drawing

A big "+" at the bottom right of the input area let's you create a new note-element in edit mode.
Every element has 2 modes:   edit  /  preview
edit / preview is available per element.
All elements can be in edit mode at the same time.

What do you think?

have fun!
mario


 

Ste Wilson

unread,
Sep 29, 2017, 2:49:24 AM9/29/17
to TiddlyWiki
Just a quick thought but a few weeks ago someone put a 'preview in seperate window' button up on here. So you could remain in edit mode and see a live preview with a bit of alt-tabbing. Quick fix perhaps?

TonyM

unread,
Sep 29, 2017, 9:09:25 AM9/29/17
to TiddlyWiki
Mario,

that sounds interesting but hard for me to visualise. I hope whatever solution allows us to avoid unnessasary cognative load, after all creative writting or taking notes in a technical course already demand ones brain cpu cycles.

looking at the trello/kanban discussion else where which opens a bespoke view of tiddler lists it seems to me it should be possible to build a bespoke editor view as well, perhaps one that simply stores the character position from the begining of the text field.

let us know where your thinking wanders.

tony

TonyM

unread,
Sep 29, 2017, 9:14:57 AM9/29/17
to TiddlyWiki
Ste,

I have done something similar with open in new window, which I love. Even preview mode with a closed side bar is quite good, the problem comes when you jump to a new tiddler to look something up or create a new item, then return to the editing tiddler, finding where you were or now want to be in the text.

thanks for the suggestion
tony

Jed Carty

unread,
Sep 29, 2017, 9:19:26 AM9/29/17
to TiddlyWiki
I don't think that creating a way to have the cursor appear at the position clicked in normal text is a problem, but in the context of tiddlywiki this doesn't make sense. You can create tiddlers that have no text content but they display text generated from other sources (like transfusion or filter outputs). So what behaviour do you have when a person clicks on a piece of text that doesn't have a corresponding tiddler?

This isn't just an idle question, anything that has this function necessarily needs to answer this question or it won't be useable. There are plenty of places in tiddlywiki where you can see text that doesn't exist anywhere other than in the rendered content. Unless something understandable happens in this situation than it won't be usable and I don't think that there is any appropriate behaviour for it.

Danielo Rodríguez

unread,
Sep 29, 2017, 9:24:09 AM9/29/17
to TiddlyWiki
I was thinking in a solution similar to what Mario has described just some days ago. It should be easy to implement and should provide (at least) an experience close to paragraph editing , where each paragraph it's a separate tiddler created automatically, and once you leave the paragraph it is set to preview mode.
If I have time, I'll try to create a small proof of concept, but if Mario has something already I would like to see it too

@TiddlyTweeter

unread,
Sep 29, 2017, 12:17:23 PM9/29/17
to TiddlyWiki
Jed Carty wrote:
I don't think that creating a way to have the cursor appear at the position clicked in normal text is a problem, but in the context of tiddlywiki this doesn't make sense. You can create tiddlers that have no text content but they display text generated from other sources ... (my emphasis)

I think Jed is absolutely right.

Doing this without considering the functional outcome would be a problem. I do think the approach has merit but, exactly WHAT are we talking about?

I can imagine a TW that could benefit from direct "surface level" editing when its properly de-limited to direct edit of base Tiddlers--but I can't imagine a TW where that could be a workable universal approach because transclusion would make it very confusing & dysfunctional.

I think part of the issue is not just tech--its about conceptual design. In other words: where its possible to do it, HOW do you indicate that in a useful way--whilst ALSO indicating in other cases it can't function?

I think the gist of Jed's point is that as TW currently is we spend lots of time "HIDING" the originating Tiddlers in various types of transclusion--and that is pretty central to TW's ability to create integrated wholes. So, I see now, this issue would seriously struggle with that.

But maybe a de-limited approach could work for specific types of TW app?? But its hard to see anything generic being viable for all (like many, if not, most) situations.

Best wishes
Josiah

PMario

unread,
Sep 29, 2017, 12:55:52 PM9/29/17
to TiddlyWiki
On Friday, September 29, 2017 at 3:24:09 PM UTC+2, Danielo Rodríguez wrote:
I was thinking in a solution similar to what Mario has described just some days ago. It should be easy to implement and should provide (at least) an experience close to paragraph editing,

Same as my idea.
 
where each paragraph it's a separate tiddler created automatically,

right
 
and once you leave the paragraph it is set to preview mode.

I would like to have a manual "per paragraph" switch and a "toggle all" button.
 
If I have time, I'll try to create a small proof of concept,

good.
 
but if Mario has something already I would like to see it too

I did develop the idea, while writing the post. So no code available. ...

---------

There is a proof of concept somewhere, with "inline" tiddler editing. ... But is has way more UI, that I want to have. I can't find the link atm.

have fun!
mario

TonyM

unread,
Sep 29, 2017, 8:51:56 PM9/29/17
to TiddlyWiki
Jed and Josiah,

I appreciate your contribution, but I think you are missing the point. If I am authoring tiddlywikis, and entering content into tiddlers (not code, designs etc...) it is great to have multiple tiddlers, tagged and organised, but if you jump from one tiddler to another to add, edit, review and modify tiddler content it costs you time and thinking space that interferes with the process of capturing ideas. In my example during a training course.

If I could search through a displayed tiddler click somewhere in the text and start typing rather than;

Search for where I want to add edit text, open the tiddler for edits, re-search for the point in the tiddler with a somewhat different layout (As not wikified) Position the cursor then continue typing.

In someways it would not matter if it did not address transclusion and substitution, just opens at the nearest possible position. Because my main concern is when imputing original content. This is wearing the content author hat.

I think you two may be coming from a design developer perspective, This is a Hat I also wear, Then consider this. I have a Tiddler called ShowCode, which is Tagged $:/tags/ViewTemplate and the contents are;

<!-- My Comment -->
<$list filter=[is[current]tag[ShowCode]]>
<pre><$view field="text"/></pre>
</$list>

Now any "code tiddler" I want I tag with ShowCode and at the bottom in view tiddler mode I see the actual contents pre-rendering (unwikified), for example try it on the shadow tiddler $:/core/macros/export

Now a designer developer can view the code and with my dream solution click to edit at a particular location. No need to deal with the complex rendering issues.

However if we could deal with the transclusions and substitutions such as in preview mode, eg; click on part of the preview that is transcluded, the result of a macro etc.. and the cursor jumps to the line that invokes the transclusion all the better.

Do you guys see my vision?

Tony


TonyM

unread,
Sep 29, 2017, 9:01:14 PM9/29/17
to TiddlyWiki
Mario,

To illustrate this further,

See my reply to Jed, using a ShowCode tag and addition to view template. Perhaps a quick solution is toggle an unwikified view of text content designed to capture the cursor position (Character N in Text) when clicked, then open the text for editing with the cursor at character N.

Perhaps we could put a tiddler into a quick edit mode, with unwikified at the top, wikified below that, click in unwikified area to edit at that point.

Regards
Tony

Jed Carty

unread,
Sep 30, 2017, 3:38:10 AM9/30/17
to TiddlyWiki
I see what you are saying and I agree that it would be very useful, but when I sit down to make it the first question is 'how do you capture the location of the cursor?'

If you just have text than I don't even think it is a difficult task to find the word under a mouse click and then set the cursor in the editor to that word. But then I have to actually make something that does that and the first thing that is going to happen is someone clicks to edit inside one of the tabs in the GettingStarted tiddler on tiddlywiki.com

What should it do? Without knowing that I can't even start.

If it is just supposed to do nothing than what is there to show the person using the wiki the difference between it being broken and them clicking on a place they can't edit? How does the code determine if they have clicked on a place where they can edit or not?

Your idea of a code viewer option would work, but that would be the only context where it would work because transclusions or generative content wouldn't be displayed.

So this would be straight forward if we made a plugin that only allowed simple markup (no widgets or transclusion) for some tiddlers, then you could edit in those tiddlers.

@TiddlyTweeter

unread,
Sep 30, 2017, 11:16:32 AM9/30/17
to TiddlyWiki
Ciao TonyM

Excellent discussion.

TonyM wrote:
... I think you two may be coming from a design developer perspective ...

Let's not get carried away. I am a bit of an idiot :-)
 
... Now any "code tiddler" I want I tag with ShowCode and at the bottom in view tiddler mode I see the actual contents pre-rendering (unwikified), for example try it on the shadow tiddler $:/core/macros/export

But I think that ACTUALLY ILLUSTRATES my & Jed's points.

It can make great sense DELIMITED to specific situations. The problem is how to do it GENERICALLY? That only matters if you are interested in the wider context of probable usages.

I think Jed & I are trying to think it through into "what a common framework might look like? And is it even possible?"

But, in no way anti-anything. But the issues we raised ARE relevant IMO.

Very best wishes
Josiah

Jan

unread,
Sep 30, 2017, 11:35:50 AM9/30/17
to tiddl...@googlegroups.com
Hi Steve, Hi everyone,

I made that Open in new window button on slides and stories but I lost
it updating from an older version.
Does anyone have a copy to reinstall it? Otherwise I will make a new one...

Yours Jan

Ste Wilson

unread,
Sep 30, 2017, 2:36:40 PM9/30/17
to TiddlyWiki
Hi Jan
I'm currently on my phone so can't download and attach the plugin but it's sitting in my tiddlywikki at http://stephenteacher.tiddlyspot.com of you want to grab it.

Steve

Mark S.

unread,
Oct 8, 2017, 5:38:00 PM10/8/17
to TiddlyWiki
Here's my general concept. An editor environment where you take your notes in chunks so that your cursor is position is more or less unnecessary. You make new notes without having to create a tiddler title in a separate box. You just keep moving forward. You can go back later to make links, change titles, etc. Basically the idea is to make it easy to do things "the TW5 way".

Mark

Screenshot-2017-10-8 Linecelerator.png

TonyM

unread,
Oct 8, 2017, 7:09:49 PM10/8/17
to TiddlyWiki
Mark,

That looks like a great alternative especially for live note taking. Let me know if I can help you achieve this. It will not help in some cases where click to edit will but it may actually be a better answer for Notes.

Regards
Tony

TonyM

unread,
Oct 8, 2017, 7:24:15 PM10/8/17
to TiddlyWiki
To All,

Thanks for the feedback. A Quick summary of where I see this now.

Note taking may be better served by other solutions including Marks Lincelerator, Preview mode with save and no exit.

On click to edit at cursor which aside from note-taking, text input would be most helpful when reviewing long and complex tiddlers, for example a large stylesheet, javascript etc...

I do not know how to do this beyond my example of ShowCode (in this thread) , but it seems to me a custom view of tiddler content like ShowCode Presents in this thread https://groups.google.com/d/msg/tiddlywiki/sohTQhPaQjI/Cm0uZU-kCAAJ designed specifically to click to edit at cursor would be achievable.

Under this model there is no rendering happening, the cursor position would give the nth character in the text field, which could be navigated to on edit.

Sure not reaching the imagined heights of click to edit at cursor on rendered tiddlers it could still be a boon to developers and enthusiasts alike editing large tiddlers and/or code.

Open tiddler, toggle view, review if this has the thing you need to change, locate it, click on it, editor opens and the cursor is sitting where you clicked. (No second search within edit mode)

We could call this "View Source", and Edit Source (at a click)

I may do this myself in time but if someone knows some rudimentary html editor design methods please help.

Tony



TonyM

unread,
Oct 21, 2017, 8:36:29 AM10/21/17
to TiddlyWiki
Jed,

.Sorry reopen this older thread, but once again I see value adding this to our tools for development and multi-tiddler editing.

The code view option, is not limited much by its context, if any user knows how to enter the markdown they know their way around it, and may be happy to work this way until they need a fully formatted and rendered view.

If in fact I am keen to edit a tiddler, I must go into edit mode, and read the markdown, why cant I do if from a view mode, and click right where I want to edit. When working in a subject area, like my recent BigData course, I often wanted to add a bullet point in a previous section, this was fine but If I was not already editing the tiddler, I would review down the rendered page, Realise it was near the bottom., select edit, the whole view changed (entering edit mode), and I had to scan the markdown again.

.
The ability seems to be there,  Google Suggests it, I just cant do it with my level of understanding.

If on tagging a tiddler with a nominated code we would see the content of the tiddler un-rendered, this could be done in a box or area we control totally, it will only appear if so requested. Then this area will respond to a click and open for edit where so clicked. We can leave the tiddler in this view mode (on saving) and jump back and forth as needed, if such a text area could be opened in a separate window it would be trivial to see the rendered result in the main window. When taking notes organised in multiple tiddlers, I am happy to only see the rendered text, the clear format can be viewed later.

Anyway, If you see the value, let me know if you can help.

Thanks
Tony 
Reply all
Reply to author
Forward
0 new messages