On Thursday, May 22, 2014 12:16:45 AM UTC+8, Edward K. Ream wrote:
>
> On Wed, May 21, 2014 at 10:11 AM, nakedmind 
> <[email protected] <javascript:>> wrote: 
> > On Wednesday, May 21, 2014 7:20:44 PM UTC+8, Terry wrote: 
> >> 
> >> I wonder if it would be sense for Leo's select body code to use a hook 
> >> or something similar to find the body widget, so that plugins could 
> >> change the meaning of "the body widget" more easily.  Will make a note. 
> >> 
> > 
> > I don't know if it's related but I've had this idea for a while now. 
> What if 
> > you can have multiple body editors for different data like ordinary 
> text, 
> > rich text, image, etc. 
> > There is a global dictionary that maps node directives to body editors. 
> > Plugins can add new node directives and select which existing body 
> editors 
> > to use by just 
> > updating the global dictionary. Or plugins can add new body editors. So 
> if 
> > create a plugin that introduces a @pdf node directive and a 
> corresponding 
> > pdf viewer, I can just update the global dictionary and leo will know 
> that 
> > nodes with headlines starting with the aforementioned directive will use 
> my 
> > plugin's pdf viewer. The body editor may even be an external 
> application. 
>
> Not a bad idea.  In effect, this would be a generalization of the 
> viewrendered or viewrendered2 plugins.  At present, these plugins have 
> this logic hard coded. 
>
> It's surprisingly complicated to switch the rendering widget 
> dynamically.  It's conceivable that a more general approach would be 
> less complex/buggy, but I wouldn't get my hopes up :-) 
>
> Edward 
>

I'd like to take a stab at this once I get some free time. Can you give 
some pointers as to where in leo's code I should start hacking.
I have limited knowledge on leo's code but i'm pretty experienced with 
pyqt. 

Eric

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to