Revert "Merge branch 'MDL-52944-master' of git://github.com/cameron1729/moodle"
authorDan Poltawski <dan@moodle.com>
Wed, 13 Apr 2016 09:48:59 +0000 (10:48 +0100)
committerDan Poltawski <dan@moodle.com>
Wed, 13 Apr 2016 09:48:59 +0000 (10:48 +0100)
This reverts commit 61a0465ce76154dbe223649c58c66313e9b510ae, reversing
changes made to 2408f8fe2bf6321592cc1ab5a8db6f9b3c65eb4b.

lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js
lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor.js
lib/editor/atto/yui/src/editor/js/editor.js
lib/editor/atto/yui/src/editor/meta/editor.json

index 12bbd73..09ba0b7 100644 (file)
Binary files a/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js and b/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js differ
index 6a9f460..912122e 100644 (file)
Binary files a/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js and b/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js differ
index 8bb9461..27f74d3 100644 (file)
Binary files a/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor.js and b/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor.js differ
index 8e32e9e..8089a11 100644 (file)
@@ -210,6 +210,11 @@ Y.extend(Editor, Y.Base, {
         // Disable odd inline CSS styles.
         this.disableCssStyling();
 
+        // Use paragraphs not divs.
+        if (document.queryCommandSupported('DefaultParagraphSeparator')) {
+            document.execCommand('DefaultParagraphSeparator', false, 'p');
+        }
+
         // Add the toolbar and editable zone to the page.
         this.textarea.get('parentNode').insert(this._wrapper, this.textarea).
                 setAttribute('class', 'editor_atto_wrap');
@@ -291,10 +296,6 @@ Y.extend(Editor, Y.Base, {
      * @chainable
      */
     setupAutomaticPolling: function() {
-        // Force use of <p> tags when pressing enter key
-        this._registerEventHandle(this.editor.on('key', function() {
-            document.execCommand('formatBlock', false, 'p');
-        }, 'press:enter', this));
         this._registerEventHandle(this.editor.on(['keyup', 'cut'], this.updateOriginal, this));
         this._registerEventHandle(this.editor.on('paste', this.pasteCleanup, this));
 
index 6594ac9..a8f9ff3 100644 (file)
@@ -7,7 +7,6 @@
             "overlay",
             "escape",
             "event",
-            "event-key",
             "event-simulate",
             "event-custom",
             "node-event-html5",