Ticket #4343 (closed New Feature: fixed)

Opened 7 months ago

Last modified 4 months ago

Implement BrowserContextMenuOnCtrl

Reported by: alfonsoml Owned by: garry.yao
Priority: Normal Milestone: CKEditor 3.1
Component: UI : Context Menu Version: 3.0
Keywords: Review+ Cc:

Description

Port that setting from FCKeditor

Attachments

4343.patch Download (1.8 KB) - added by garry.yao 5 months ago.
4343_2.patch Download (1.9 KB) - added by garry.yao 4 months ago.
4343_3.patch Download (1.9 KB) - added by garry.yao 4 months ago.

Change History

Changed 5 months ago by garry.yao

Changed 5 months ago by garry.yao

  • keywords Review? added
  • owner set to garry.yao
  • status changed from new to assigned

Changed 4 months ago by fredck

  • keywords Review- added; Review? removed
  • The browserContextMenuOnCtrl is plugin specific and should not be in config.js.
  • In any case, it's not needed to declare the above config. It can be a "documentation only" thing, just like the dialog settings.
  • The context menu plugin should be used in the future to activate context menus in other places, like when right clicking on element path tags to act over them, or even into the toolbar to customize it. So, it's better to not change it's signature to make it editor area specific. Other than that, the contextMenu class already receives the editor as a constructor parameter, so passing it to addTarget is redundant.

What about an additional parameter to addTarget, which tells whether to show the browser context menu on CTRL?

Changed 4 months ago by garry.yao

Changed 4 months ago by garry.yao

  • keywords Review? added; Review- removed

Fixing the above mentioned issue and update the patch with #4530.

Changed 4 months ago by fredck

  • keywords Review- added; Review? removed

It's almost perfect. The only problem is that now you're not considering the default value associated to the setting. In this case, it's "true". In effect, the feature is not available by leaving the config file empty.

The pattern for that is the following, when retrieving the setting:

var browserContextMenuOnCtrl = editor.config.browserContextMenuOnCtrl;
browserContextMenuOnCtrl = ( typeof browserContextMenuOnCtrl == 'undefined' || browserContextMenuOnCtrl );

Changed 4 months ago by garry.yao

Changed 4 months ago by garry.yao

  • keywords Review? added; Review- removed

Changed 4 months ago by fredck

  • keywords Review+ added; Review? removed

Changed 4 months ago by garry.yao

  • status changed from assigned to closed
  • resolution set to fixed

Fixed with [4540].

Note: See TracTickets for help on using tickets.