Disable custom buttons and menu items on Code tab?

4 messages Options
Embed this post
Permalink
J. Tyler

Disable custom buttons and menu items on Code tab?

Reply Threaded More More options
Print post
Permalink
Hello,

Is there a way to disable custom toolbar buttons and menu items when the user is on the Code tab?  

Thanks,

Joe
Adrian Sutton

Re: Disable custom buttons and menu items on Code tab?

Reply Threaded More More options
Print post
Permalink
On 28 Oct 2009, at 15:34, J. Tyler wrote:
> Is there a way to disable custom toolbar buttons and menu items when  
> the
> user is on the Code tab?

Hi Joe,
There appears to be an undocumented option designViewOnly="true" which  
you can specify in the configuration file.  eg:
<menuItem name="test" designViewOnly="true"
           action="InsertHTMLAtCursor" value="foo" text="Test" />

I can't guarantee that the attribute won't be taken away again in  
future versions but even if it does it would just mean the menu item  
is enabled again in code view.  If you want the fully supported,  
definitely won't break in future versions, you'd need to use the  
Plugin APIs which gives you a whole heap of flexibility. See: http://liveworks.ephox.com/hints-tips/advanced-custom-menu-items

Regards,

Adrian Sutton.
______________________
Adrian Sutton, CTO
UK: +44 1 628 353 032  US: +1 (650) 292 9659 x717
Ephox http://www.ephox.com/
Ephox Blogs http://planet.ephox.com/, Personal Blog http://www.symphonious.net/



_______________________________________________
[hidden email]
List instructions at http://liveworks.ephox.com/mailing-list/
J. Tyler

Re: Disable custom buttons and menu items on Code tab?

Reply Threaded More More options
Print post
Permalink
Hi Adrian,

Thanks - its working perfectly!

Can I log a request to document the undocumented feature and keep it around  :)

I would think that the majority of custom buttons and menu items that your users create would not be applicable in the Code tab.

Regards,

Joe


Adrian Sutton wrote:
On 28 Oct 2009, at 15:34, J. Tyler wrote:
> Is there a way to disable custom toolbar buttons and menu items when  
> the
> user is on the Code tab?

Hi Joe,
There appears to be an undocumented option designViewOnly="true" which  
you can specify in the configuration file.  eg:
<menuItem name="test" designViewOnly="true"
           action="InsertHTMLAtCursor" value="foo" text="Test" />

I can't guarantee that the attribute won't be taken away again in  
future versions but even if it does it would just mean the menu item  
is enabled again in code view.  If you want the fully supported,  
definitely won't break in future versions, you'd need to use the  
Plugin APIs which gives you a whole heap of flexibility. See: http://liveworks.ephox.com/hints-tips/advanced-custom-menu-items

Regards,

Adrian Sutton.
______________________
Adrian Sutton, CTO
UK: +44 1 628 353 032  US: +1 (650) 292 9659 x717
Ephox http://www.ephox.com/
Ephox Blogs http://planet.ephox.com/, Personal Blog http://www.symphonious.net/



_______________________________________________
LiveWorks@liveworks.ephox.com
List instructions at http://liveworks.ephox.com/mailing-list/
Adrian Sutton

Re: Disable custom buttons and menu items on Code tab?

Reply Threaded More More options
Print post
Permalink
On 3 Nov 2009, at 16:11, J. Tyler wrote:
> Can I log a request to document the undocumented feature and keep it  
> around
> :)
>
> I would think that the majority of custom buttons and menu items  
> that your
> users create would not be applicable in the Code tab.

Actually it turns out we did mention it in the change log for  
EditLive! 6.2 (http://releases.ephox.com/editlive-6200) so it's  
officially a feature, just missing from our documentation.  I've  
logged a bug (EL-2893) to get the documentation fixed up, but it looks  
like you should be able to depend on it sticking around.

Regards,

Adrian Sutton.
______________________
Adrian Sutton, CTO
UK: +44 1 628 353 032  US: +1 (650) 292 9659 x717
Ephox http://www.ephox.com/
Ephox Blogs http://planet.ephox.com/, Personal Blog http://www.symphonious.net/



_______________________________________________
[hidden email]
List instructions at http://liveworks.ephox.com/mailing-list/