2

I have written two widgets used on a form, now I have to write a plugin to be loaded in a view with editable content. These plugins should not mix: the buttons shown in the first two make no sense on the view, also the contextual menus in CKEditor are supposed to be different. I searched the CKEditor API documentation and searched stackexchange and stackoverflow, but found no hint. Is this possible at all?

EDIT (too long for a comment)

Yes, more or less it is possible: I get close to what I need by defining text format specifici to the fields I need to edit differently; then I can configure the plugins I need on the text format configuration page, and change the text format associated to each field in the field settings page (luckily, the different plugins are associated to different fields). I was bitten by this bug, so I was forced to set a default value for the fields, but that's acceptable. I was forced to associate a button event to a plugin which wouldn't need one in order to be able to associate it to the text formats using the Drupal configuration page, but that's also acceptable, it doesn't show up in the toolbar; at the moment I am trying to understand why this plugin (an autocomplete based on the autotag example, which I'm going to modify to get autocompletion from a web service) is still active on the instance where I didn't associate it to the text format, but that's also a minor problem.

closed as unclear what you're asking by Kevin, leymannx, Free Radical, sanzante, Yusef Mohamadi Feb 4 at 10:52

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.