[WebODF] Editor Menu Bar Idea

Jos van den Oever jos.van.den.oever at kogmbh.com
Tue Oct 29 13:03:30 CET 2013


On 10/26/13 01:09, Ryan Callaghan wrote:
> My team is evaluating WebODF / the editor for use as part of an internal
> tool.  In doing this one of the things that has come up that seems like
> it would be beneficial is to provide a hook to replace the menu bar with
> a custom one.

That is certainly possible.

> For us we would nee the save button to save to a server, possibly
> generate a PDF, and we would likely want to remove several of the
> default buttons.

These two issues are handled in different parts of the code. First off, 
custum saving logic can be added by overriding runtime.writeFile.

You can see an example of this in the javascript fragment in 
programs/qtjsruntime/pagerunner.cpp.

To modify the toolbar you can simply comment out the irrelevant parts 
from the ui code in programs/editor.

> The idea would be when constructing the editor a optional javascipt file
> name could be passed down as an argument - this would define the menu
> bar rather than using the default (there are likely other ways to do
> this as well).  This would allow individuals to leverage the components
> already within the WebODF editor menu bar, be able to tweak it
> generically, and not have to rebuild webodf for minor adjustments.
>
> A setup like this seems like it would make the API usable with a broader
> audience without having to add in a significant amount of configuration
> options.
>
> Thoughts?

That is of course a much neater approach. We are currently not planning 
a configuration file for what UI components to enable but such a feature 
would definitely be welcome. If you want to take this approach and 
contribute such a setup method, that would be great.

Cheers,
Jos




More information about the WebODF mailing list