Index: plugins/dcCKEditor/inc/dc.ckeditor.behaviors.php
===================================================================
--- plugins/dcCKEditor/inc/dc.ckeditor.behaviors.php	(revision 3915)
+++ plugins/dcCKEditor/inc/dc.ckeditor.behaviors.php	(revision 3977)
@@ -20,5 +20,5 @@
      * @param editor   <b>string</b> wanted editor
      * @param context  <b>string</b> page context (post,page,comment,event,...)
-     * @param tags     <b>array</b>  array of ids into inject editor
+     * @param tags     <b>array</b>  array of elt ids (textarea) where inject editor
      * @param syntax   <b>string</b> wanted syntax (xhtml)
      */
@@ -33,27 +33,25 @@
 
         $res =
-        '<script type="text/javascript">' . "\n" .
-        dcPage::jsVar('dotclear.ckeditor_context', $context) .
-        'dotclear.ckeditor_tags_context = ' . sprintf('{%s:["%s"]};' . "\n", $context, implode('","', $tags)) .
-        'var CKEDITOR_BASEPATH = "' . DC_ADMIN_URL . self::$p_url . '/js/ckeditor/";' . "\n" .
-        dcPage::jsVar('dotclear.admin_base_url', DC_ADMIN_URL) .
-        dcPage::jsVar('dotclear.base_url', $GLOBALS['core']->blog->host) .
-        dcPage::jsVar('dotclear.dcckeditor_plugin_url', DC_ADMIN_URL . self::$p_url) .
-        dcPage::jsVar('dotclear.user_language', $GLOBALS['core']->auth->getInfo('user_lang')) .
-        'CKEDITOR_GETURL = function(resource) {
-                // If this is not a full or absolute path.
-                if ( resource.indexOf(":/") == -1 && resource.indexOf("/") !== 0 ) {
-                    resource = this.basePath + resource;
-                }
-                return resource;
-             };' . "\n" .
-        "dotclear.msg.img_select_title = '" . html::escapeJS(__('Media chooser')) . "'; " . "\n" .
-        "dotclear.msg.img_select_accesskey = '" . html::escapeJS(__('m')) . "'; " . "\n" .
-        "dotclear.msg.post_link_title = '" . html::escapeJS(__('Link to an entry')) . "'; " . "\n" .
-        "dotclear.msg.link_title = '" . html::escapeJS(__('Link')) . "'; " . "\n" .
-        "dotclear.msg.link_accesskey = '" . html::escapeJS(__('l')) . "'; " . "\n" .
-        "dotclear.msg.img_title = '" . html::escapeJS(__('External image')) . "'; " . "\n" .
-        "dotclear.msg.url_cannot_be_empty = '" . html::escapeJS(__('URL field cannot be empty.')) . "';" . "\n" .
-        "</script>\n" .
+        dcPage::jsJson('ck_editor_ctx', [
+            'ckeditor_context'      => $context,
+            'ckeditor_tags_context' => [$context => $tags],
+            'admin_base_url'        => DC_ADMIN_URL,
+            'base_url'              => $GLOBALS['core']->blog->host,
+            'dcckeditor_plugin_url' => DC_ADMIN_URL . self::$p_url,
+            'user_language'         => $GLOBALS['core']->auth->getInfo('user_lang')
+        ]) .
+        dcPage::jsJson('ck_editor_var', [
+            'CKEDITOR_BASEPATH' => DC_ADMIN_URL . self::$p_url . '/js/ckeditor/'
+        ]) .
+        dcPage::jsJson('ck_editor_msg', [
+            'img_select_title'     => __('Media chooser'),
+            'img_select_accesskey' => __('m'),
+            'post_link_title'      => __('Link to an entry'),
+            'link_title'           => __('Link'),
+            'link_accesskey'       => __('l'),
+            'img_title'            => __('External image'),
+            'url_cannot_be_empty'  => __('URL field cannot be empty.')
+        ]) .
+        dcPage::jsLoad(self::$p_url . '/js/_post_editor.js') .
         dcPage::jsLoad(self::$p_url . '/js/ckeditor/ckeditor.js') .
         dcPage::jsLoad(self::$p_url . '/js/ckeditor/adapters/jquery.js') .
Index: plugins/dcCKEditor/js/_post_editor.js
===================================================================
--- plugins/dcCKEditor/js/_post_editor.js	(revision 3977)
+++ plugins/dcCKEditor/js/_post_editor.js	(revision 3977)
@@ -0,0 +1,18 @@
+/*global dotclear, getData, mergeDeep */
+/*exported CKEDITOR_GETURL */
+'use strict';
+
+// Get context
+Object.assign(dotclear, getData('ck_editor_ctx'));
+// Get messages
+mergeDeep(dotclear.msg, getData('ck_editor_msg'));
+// Get CK Editor variables
+Object.assign(window, getData('ck_editor_var'));
+
+var CKEDITOR_GETURL = function(resource) {
+  // If this is not a full or absolute path.
+  if (resource.indexOf(":/") == -1 && resource.indexOf("/") !== 0) {
+    resource = this.basePath + resource;
+  }
+  return resource;
+};
