Part of #1879820: [meta] Get the D7 version of Edit production-ready.

Now that CKEditor has been selected, we need Edit module to integrate with it.

Comments

webchick’s picture

We spoke on the phone this morning about the various options for integrating with CKEditor v4 (the WYSIWYG editor that Drupal 8 core will use), which include:

- http://drupal.org/project/ckeditor - Official, standalone project from the CKEditor team
- http://drupal.org/project/wysiwyg_ckeditor - Nate's D8 backport project which integrates with WYSIWYG module
- WYSIWYG module + http://drupal.org/node/1853550

Of the options, http://drupal.org/project/ckeditor seems to be much further along, and also has over 100K active users. We were also concerned that if we built in WYSIWYG module support into Spark, that people would start filing bug reports about the fact that it didn't work with e.g. TinyMCE. Better to focus on deep integration with one editor, but of course we'd still accept patches for other edit_X modules that integrate with others.

webchick’s picture

Ha; see somewhat parallel discussion happening in the Commons queue at #1879036: Replace Aloha with CKEditor via CKEditor project and reaching a different conclusion. ;)

ezra-g’s picture

Since Spark 7.x uses the Libraries module, this work likely also includes #1063482: Use Libraries API for CKEditor.

wim leers’s picture

#3: AFAICT the only reason D7 Spark uses Libraries API is because it also uses http://drupal.org/project/json2, which depends on Libraries API. Spark's Layout/Gridbuilder module needed it, but since you're not going to ship with that, I wouldn't spend any time on Libraries API.

ezra-g’s picture

#4: Makes sense. Note that CKEditor appears to be hardcoded to finding the library in a subdirectory of sites/all/, which is inconsistent with profiles that put their contents in profiles/[profile-name]/:

/**
 * Generate library path of the Drupal installation.
 *
 * @return
 *   Path of library in the Drupal installation.
 */
function ckeditor_library_path($mode = 'relative') {
  switch ($mode) {
    default:
    case 'relative':
      return ckeditor_base_path('relative') . '/sites/all/libraries';
    case 'local':
      return ckeditor_base_path('local') . '/sites/all/libraries';
    case 'url':
      return 'sites/all/libraries';
  }
}

That was my main motivation for providing Libraries module support to CKEditor, but if sites/all/libraries is ok for Spark, I'm fine with Commons doing the same.

webchick’s picture

That's a very good point, Ezra. We should test that.

wim leers’s picture

sidenote: Yes, the CKEditor module should stop making strange assumptions and its codebase should be more Drupalish. I don't want to raise that with the CKEditor guys now though, because it's more important that they focus on CKEditor itself (the JS) to maximize the probability of getting it in D8. Improving the D7 CKEditor module would be a post-CKEditor 4.1 thing (i.e. post-mid-Feb).

nod_’s picture

Ok first go at integrating ckeditor is up on 7.x-1.x and you need to install the ckeditor module.

It will most likely need to be put in sync with what D8 comes up with but for now it sort of works. The toolbar is missing but the editable area is in fact ckeditor. The configuration is not fully taken into account at the moment, will see how it goes when I get back to it next week.

nod_’s picture

Status: Active » Needs review

Just pushed an initial integration with ckeditor module (not ckeditor through wysiwyg module).

CKEditor module needs to be installed and you need to be using the development version of CKEditor (not the minified one) because required plugin is not working well otherwise. That will be solved with the 4.1 version of CKEditor, in the meantime use the uncompressed version.

nod_’s picture

Now working fine with prod version of ckeditor. You need to check the "sharedspace" plugin in ckeditor configuration for edit to work proplerly with ckeditor. (not anymore, yay!) Working on activating that by default at the moment.

nod_’s picture

Status: Needs review » Fixed

ckeditor has been fixed upstream to be able to use libraries api properly. Integration is working. There are some issues left that will be addressed in other issues.

Automatically closed -- issue fixed for 2 weeks with no activity.