Opened 7 years ago

Last modified 4 years ago

#8759 assigned New Feature

Add the possibility to remove a context menu item at a certain listener

Reported by: Sa'ar Zac Elias Owned by: Sa'ar Zac Elias
Priority: Normal Milestone:
Component: General Version:
Keywords: IBM Cc: monahant@…

Description

During work, I've encountered a situation in which I need to remove the div options from the context menu in a specfic condition (while leaving it intact in any other situation). This is currently impossible - one can remove an option for the entire instance, and not just that one time.
My suggestion is to allow it with null assignment:

return { editdiv : null };

Attachments (1)

8759.patch (1.4 KB) - added by Sa'ar Zac Elias 7 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 7 years ago by Sa'ar Zac Elias

Type: BugNew Feature

Changed 7 years ago by Sa'ar Zac Elias

Attachment: 8759.patch added

comment:2 Changed 7 years ago by Sa'ar Zac Elias

Owner: set to Sa'ar Zac Elias
Status: newreview

comment:3 Changed 7 years ago by Teresa Monahan

Cc: monahant@… added
Keywords: IBM added

We would also like to be able to remove menu items dynamically in the editor, depending on the current context. Please consider including this feature in an upcoming CKEditor release.

comment:4 Changed 7 years ago by Jakub Ś

Perhaps there could be possibility to add options like add/remove/modify context menu item.
Much more work but more happy users.

Another typical use case except for removing items based on current context is changing their values or adding them.

comment:5 Changed 6 years ago by Frederico Caldeira Knabben

Status: reviewassigned

We should investigate the possibility of having this event-driven, having the editor instance firing either the "contextmenu" or "menu" event, having the list of items (Array) in the data field, so one can manipulate it freely.

comment:7 Changed 4 years ago by Anna Tomanek

Summary: Add possibility to remove context menu item at certain listenerAdd the possibility to remove a context menu item at a certain listener
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy