[pmwiki-users] GUI edit behavior

Petko Yotov 5ko at 5ko.fr
Mon Jan 27 02:13:39 PST 2025


On 27/01/2025 10:34, Martin Cuno wrote:
> A small question about the GUI Edit functionality: Did I miss
> something (when updating to PmWiki 2.4.0)? I was used to the
> following: When I highlight a word and format it with Gui Edit (e.g.
> as a link), the cursor then goes behind the word. After the update,
> the word now remains highlighted instead.

Indeed, this has changed the way you describe it, the selection was lost 
after an insertion, now it stays selected. This has been the intended 
behavior since the start but somehow I couldn't do it, there was a logic 
bug/problem that I only resolved recently.

The new behavior works like advanced text editors and word processors, 
and the new $EditAutoBrackets feature works better, especially on touch 
screens or for people not using a mouse.

So you can select some text, type [ or ", and it will wrap the text in 
the closing bracket or quote. Then you can type again [ and since the 
text stays selected, it will become surrounded by double brackets.

So instead of the cursor going after the insertion and you having to 
select it again, the selected text stays selected.

The same way you can quickly wrap markup expressions, first type { then 
( and the selected text is wrapped in {(...)}.

Same if you want to add tooltip titles to links like 
[[link"title"|text]].

I really love this $EditAutoBrackets feature, it is enabled on 
PmWiki.org if you want to test it, and it is documented here:

   https://pmwiki.org/EditVariables#EditAutoBrackets

> BUT: in my offline version
> (I always mirrored everything and use the same Firefox) the old
> behavior continues. I would like the old behavior back, or at least
> consistent behavior, otherwise I make too many mistakes.

You should absolutely be able to get the new behavior consistent.

I suspect the browser cache may need clearing - on Firefox hold down 
Shift and click on the Reload page circular arrow button.

Or, less likely, the offline installation may be incompletely upgraded, 
some files in the scripts/ and pub/ directories may be missing, 
especially pub/guiedit/guiedit.js (and then clear the browser cache).

Petko

-- 
If you upgrade :  https://www.pmwiki.org/Upgrades



More information about the pmwiki-users mailing list