Opened 3 months ago

Closed 2 months ago

Last modified 36 hours ago

#16850 closed New Feature (fixed)

Custom context menu disable option

Reported by: m.lewandowski Owned by: Tade0
Priority: Normal Milestone: CKEditor 4.7.0
Component: General Version: 4.7.0 (GitHub - major)
Keywords: Cc:

Description (last modified by m.lewandowski)

We need an option to disable our custom context menu, even if the plugin is loaded. The thing is that contextmenu plugin is required by plugins like tabletools or liststyle, where it's the only way to see the features added by the plugin.

If we'd remove it from required property, this plugin would not be automatically picked by our online builder, so that's a no-go.

But some customers provide custom implementation of UI, where context menu is not needed.

Change History (11)

comment:1 Changed 3 months ago by m.lewandowski

  • Status changed from new to confirmed

comment:2 Changed 2 months ago by m.lewandowski

  • Description modified (diff)

comment:3 Changed 2 months ago by Tade0

  • Owner set to Tade0
  • Status changed from confirmed to assigned

comment:4 Changed 2 months ago by Tade0

  • Status changed from assigned to review

Added a configuration option that simply prevents the context menu from opening.

comment:5 Changed 2 months ago by t.jakut

  • Status changed from review to review_failed

Fix LGTM, however there's no unit test. It should be easy to write one (probably it would be enough to check if open calls menu's show method).

comment:6 Changed 2 months ago by Tade0

  • Status changed from review_failed to review

Added unit tests.

Changes pushed to branch:t/16850.

comment:7 Changed 2 months ago by t.jakut

  • Status changed from review to review_failed

Actually, after second thoughts, I think that it would be better to have option not for disabling context menu but for enabling it. I did a quick research in our docs and found that we have at least 4 config variables with "enable" in name and 0 with "disable". There are also some similar cases, e.g. resize_enabled.

comment:8 Changed 2 months ago by Tade0

  • Status changed from review_failed to review

That's true, but the problem here is that to date the context menu was always enabled and worked out of the box - this is how most users expect it to work now.

The idea behind this feature is that some users want to have other features enabled that normally require the contextmenu plugin, but don't want to have the context menu itself.

EDIT: I see what you mean now. Changing accordingly.

Last edited 2 months ago by Tade0 (previous) (diff)

comment:9 Changed 2 months ago by Tade0

Fixed, rebased with major.

Changes pushed to branch:t/16850.

comment:10 Changed 2 months ago by t.jakut

  • Resolution set to fixed
  • Status changed from review to closed

LGTM. Merged with git:56e6fda.

comment:11 Changed 36 hours ago by m.lewandowski

  • Summary changed from Context menu disable option to Custom context menu disable option
Note: See TracTickets for help on using tickets.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy