← Back to team overview

zim-wiki team mailing list archive

Re: Modifying selected text bbcode…

 

Yes, sort lines plugin can be an example how to do it.

Another option is to patch the code calling custom tools and allow a custom
tool to filter the selected text from stdin to stdout and have zim replace
the selection when you call it.

This is actually on my wishlist and would allow something like sortl-lines
to be a custom tool instead of a plugin. Makes a powerful general mechanism
:)

Regards,

Jaap



On Mon, Jun 16, 2014 at 6:00 PM, Sylvain Viart <launchpad@xxxxxxxxxxxx>
wrote:

>  Le 13/06/2014 21:17, Jaap Karssenberg a écrit :
>
>  can I produce?
>
>>  [quote]Some text[/quote] here and more here…
>>
>>
>  Not an easy way to do that, but you could do a custom tool that takes
> both the full page and the selected text and then looks up the selection
> and replaces it.
>
>  You can define a custom tool command with "%t" to get the selected text
> as a commandline argument.
>
>
> Thanks, I already knew that feature. And I use it in another custom tool.
>
> It wont work if the selection appear more than one time in the document…
> Because how I will find the right occurrence?
>
> Is there some plug-in base interacting with the selection already?
> "sort lines" seems to work on the selection, right?
>
> Regards,
> Sylvain.
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~zim-wiki
> Post to     : zim-wiki@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~zim-wiki
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References