Using ckeditor 4.1.

I read about the sharedSpaces functionality and tried to build a setup which looks like the create.js halo demo page, where the editor toolbar is in a specific position for all instances. According to the documentation this should now be possible with the sharedSpace plugin.

Using the ckeditor module (and checking the checkbox "sharedspaces plugin") I added this code to the Custom Javascript Configuration:

config.sharedSpaces = {top : 'my-wysiwyg-top'};

('my-wysiwyg-top' relates to a div #id in the template.)

However, this doesn't seem to work. My guess is that the edit module is overriding this setting because it ships with its own version of the plugin, as stated here:
#1949906: CKEditor 4.1 is released and ships with the Shared Space plugin

I'm seeing some code in drupalckeditorwidget.js which seems to be doing the overriding stuff (around line 165).

Is this correct?

Comments

wim leers’s picture

Assigned: Unassigned » wim leers

That is correct.

I'm not sure what you're trying to do, and how you're combining that with Edit module, so I'll leave it up to you on how to move this issue forward :)

askibinski’s picture

StatusFileSize
new139.51 KB
new1 KB

What I'm trying to do is making an editor like this demo page on create.js.

And it actually is pretty simple by changing mainToolbarId into your own element ID.

drupalckeditorwidget.js:line 166

sharedSpaces: {
  top: 'my-wysiwyg-top'
}

Now, all toolbars are displayed in my designated area. However, I don't see a way to override mainToolbarId at this time. It is automatically populated:

getMainWysiwygToolgroupId: function () {
  return 'edit-wysiwyg-main-toolgroup-for-' + this._id;
},

But the CKEditor settings are already extended in the _ckeditor_attachInlineEditor function, so why not look there to see if sharedSpaces is set?
I attached a patch which demonstrates a solutions, it's probably not the best one(?), but you get what I mean.

askibinski’s picture

Version: 7.x-1.0-alpha11 » 7.x-1.x-dev
Category: support » task
Status: Active » Needs review

Changing status.

wim leers’s picture

Category: Task » Support request
Issue summary: View changes
Status: Needs review » Closed (works as designed)

Sorry for the very, very late reply.

The Drupal 8 backport (#2111667: Backport Drupal 8's Edit module to Drupal 7) has just landed and with it, it brings huge changes. In-place editing now isn't any longer something that's triggered on a page-wide level, it's something that's triggered on a per-entity level. Hence doing something like what's described in this issue no longer makes sense (it made sense in the previous mechanism).

So, closing, since there's not much I can do here :)