[pmwiki-users] text replace using regex in edit textarea

Hans Bracker design at softflow.uk
Fri Jan 23 08:07:59 PST 2026


Hi Petko, I am wondering if there is a way to add a custom guibutton 
and/or keyboard shortcut to do a custom text replace on a text selection 
in the standard edit textarea?

I would like to select some text in the edit textarea, like a paragraph, 
or more, from a longer page text, and then via  a button click or a 
keyboard shortcut have a regular expression replace done on this text. 
In particular I like to strip out newline \n and replace with simple 
space, to undo formatting from inserted pdf text. I can do this in my 
code editor, but copying and pasting paragraphs back and forward is a 
hassle. Ideally I like to choose the regular expression, or set up 
different custom "regex text replace" buttons.

I don't know if i need to hack the guiedit javascript, or how to add the 
functionality in javascript. Some advice would be greatly appreciated!

cheers,
Hans




More information about the pmwiki-users mailing list