Re: [Zim-wiki] Modifying selected text bbcode…

2014-06-18 Thread Sylvain Viart
Le 18/06/2014 09:00, Jaap Karssenberg a écrit : > The quick hack would be to modify "_exec_custom_tool()" in > "zim/gui/__init__.py" > If this works, also the custom tool dialog (defined in > zim/gui/customtools.py) should be updated to add that key as a checkbox. > > I can also imagine a similar k

Re: [Zim-wiki] Modifying selected text bbcode…

2014-06-18 Thread Jaap Karssenberg
The quick hack would be to modify "_exec_custom_tool()" in "zim/gui/__init__.py" Below my -- untested ! -- modified version of the routine. As you might guess the .desktop file for the custom tool (see .config/zim/customtools) should contain a key "X-Zim-ReplaceSelection" set to "True". If this

Re: [Zim-wiki] Modifying selected text bbcode…

2014-06-17 Thread Sylvain Viart
Le 18/06/2014 05:07, Jaap Karssenberg a écrit : > sort lines plugin can be an example how to do[…] [start hacking to perform our own custom modification on selected text] > Another option is to patch the code calling custom tools and allow a > custom tool to filter the selected text from stdin to

Re: [Zim-wiki] Modifying selected text bbcode…

2014-06-17 Thread Jaap Karssenberg
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 l

Re: [Zim-wiki] Modifying selected text bbcode…

2014-06-16 Thread Sylvain Viart
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

Re: [Zim-wiki] Modifying selected text bbcode…

2014-06-13 Thread Jaap Karssenberg
On Fri, Jun 6, 2014 at 6:38 PM, Sylvain Viart wrote: > Hum, > > I know how to modify the whole page with a custom tools. > Can I modify only the selection? > > Some text here and more here… > > ^ Selected text > > > can I produce? > > [quote]Some text[/quote] here and more here… > > Not

[Zim-wiki] Modifying selected text bbcode…

2014-06-06 Thread Sylvain Viart
Hum, I know how to modify the whole page with a custom tools. Can I modify only the selection? Some text here and more here… ^ Selected text can I produce? [quote]Some text[/quote] here and more here… Sylvain. ___ Mailing list: h