Hi Mat,

selectionEnd is the end caret position. So we split to get individual 
characters, keep only what is before selectionEnd, and join back to a 
string. 

selectionEnd and what it is used for is explained earlier in the thread. 
Part of the motivation for putting in so much time in the explanations in 
this thread is for it to serve as dev documentation, and to make sure you 
are able to follow, further develop and maintain the wikitext portions of 
the code. So when in doubt, it's worth checking if the info you need is in 
the thread. This is not criticism, just a reminder so you hopefully don't 
get stalled when I am not around, if it can be avoided.

Give this a go and see if it works:
https://saqimtiaz.github.io/sq-tw/editormagic2.html

If so, you can keep working on the wikitext, and I will explain the changes 
later. The changes are not in the editorMagicActions or the popup. So if it 
works, you should be good to continue for now.

I wonder if it would make things easier if you used a TW file hosted on 
github with the git saver, so I could easily see what had changed in each 
file. I haven't used the git saver but it should in theory be as easy as 
using tiddlyspot.

Cheers,
Saq

On Monday, July 13, 2020 at 4:51:51 PM UTC+2, Mat wrote:
>
> OK thanks, I'll see if I can just get it working, even if inconsistently, 
> in which case I can instead work on _Popup.
>
> What exactly does this do: "[{!!text}split[]first<selectionEnd>join[]]"  - 
> maybe discard everything in the full text after the fragment? I need to 
> know in order to replace selectionEnd with something, so to say.
>
> <:-)
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/999efea6-8fab-4699-aa28-d7e13ef75f5eo%40googlegroups.com.

Reply via email to