aloha.module | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/aloha.module b/aloha.module index 9f5b430..5c68a77 100644 --- a/aloha.module +++ b/aloha.module @@ -5,6 +5,16 @@ * Provides integration with the Aloha Editor WYSIWYG editor. */ +/** + * @todo: the currently included build of AE is not yet optimal for Drupal; we + * must create a build of AE that bundles the JS and CSS in single JS & + * CSS files on a per-AE plug-in basis. Then, we'll be able to define + * libraries in hook_library_info() for each of the plug-ins, allowing + * Drupal to reason about AE's dependencies. + * So: finish + leverage @nod_'s 'build-with-plugin-separated' profile in + * AE. + */ + // @todo Establish a versioning scheme for our custom build. const ALOHA_VERSION = 'custom build: 0.21.2 + patches'; @@ -62,7 +72,7 @@ function aloha_library_info() { // The Aloha Editor core. array('aloha', 'aloha.core'), // Our custom UI. - array('aloha', 'aloha.drupal-aloha/drupal-ui'), + array('aloha', 'aloha.drupal/drupal-ui'), // A sensible list of default plug-ins. array('aloha', 'aloha.common/contenthandler'), array('aloha', 'aloha.common/format'), @@ -71,7 +81,7 @@ function aloha_library_info() { array('aloha', 'aloha.common/link'), array('aloha', 'aloha.common/paste'), // Tight Drupal integration. - array('aloha', 'drupal.aloha'), + array('aloha', 'aloha.drupal/drupal'), ), ); @@ -100,7 +110,7 @@ function aloha_library_info() { 'defer' => FALSE, 'attributes' => array( // Deferred initialization to make it possible for Aloha.settings to - // live in Drupal.settings. Actual initializawtion is done in + // live in Drupal.settings. Actual initialization is done in // drupal-aloha.js. 'data-aloha-defer-init' => 'true', ), @@ -127,7 +137,6 @@ function aloha_library_info() { ); // Aloha Editor: "common" bundle of plug-ins (shipped with Aloha Editor). - // @todo Library names should only contain dots/periods. $libraries['aloha.common/ui'] = array( 'title' => 'Aloha Editor plug-in: UI.', 'version' => ALOHA_VERSION, @@ -250,23 +259,22 @@ function aloha_library_info() { ), ); - // Aloha Editor: "drupal-aloha" bundle of plug-ins (shipped with this module). - $libraries['aloha.drupal-aloha'] = array( - 'title' => 'Register the "drupal-aloha" bundle, this is the bundle that ships with this module, the "Aloha" module.', + // Aloha Editor: "drupal" bundle of plug-ins (shipped with this module). + $libraries['aloha.drupal'] = array( + 'title' => 'Register the "drupal" bundle, this is the bundle that ships with this module, the "Aloha" module.', 'version' => VERSION, 'js' => array( aloha_plugin_js_settings(array( - // @todo Rename the bundle to just 'drupal'. - 'bundles' => array('drupal-aloha' => file_create_url($module_path . '/aloha/')) + 'bundles' => array('drupal' => file_create_url($module_path . '/aloha/')) )), ), ); - $libraries['drupal.aloha'] = array( + $libraries['aloha.drupal/drupal'] = array( 'title' => '"Drupal" Aloha Editor plug-in: contenthandler + link repository', 'version' => VERSION, 'js' => array( aloha_plugin_js_settings(array( - 'plugins' => array('load' => array('drupal-aloha/drupal')), + 'plugins' => array('load' => array('drupal/drupal')), // URL for link look-ups in the "Drupal" repository. 'repository' => array( 'drupal' => array('url' => url('aloha/repository/link/')), @@ -282,13 +290,13 @@ function aloha_library_info() { ), 'dependencies' => array( // Ensure the "aloha" bundle is registered. - array('aloha', 'aloha.drupal-aloha'), + array('aloha', 'aloha.drupal'), // This plug-in ships with a custom content handler. array('aloha', 'aloha.common/contenthandler'), ) ); $ui_path = $module_path . '/aloha/drupal-ui/lib'; - $libraries['aloha.drupal-aloha/drupal-ui'] = array( + $libraries['aloha.drupal/drupal-ui'] = array( 'title' => 'Drupal-specific UI for Aloha Editor.', 'version' => VERSION, 'js' => array( @@ -298,7 +306,6 @@ function aloha_library_info() { // here. 'requireConfig' => array( 'paths' => array( - // @todo Usage of file_create_url() here and elsewhere doesn't look right. 'ui/multiSplit' => file_create_url($ui_path . '/multiSplit'), 'ui/utils' => file_create_url($ui_path . '/utils'), 'ui/toolbar' => file_create_url($ui_path . '/toolbar'), @@ -314,8 +321,8 @@ function aloha_library_info() { ), ), 'dependencies' => array( - // Ensure the "drupal-aloha" bundle is registered. - array('aloha', 'aloha.drupal-aloha'), + // Ensure the "drupal" bundle is registered. + array('aloha', 'aloha.drupal'), // We're overriding the default UI, so depend on that default UI. array('aloha', 'aloha.common/ui'), // Icons for the UI.