Merge branch 'MDL-52944-30' of git://github.com/cameron1729/moodle into MOODLE_30_STABLE

This commit is contained in:
Dan Poltawski
2016-04-12 13:18:01 +01:00
5 changed files with 19 additions and 19 deletions
@@ -212,11 +212,6 @@ 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');
@@ -298,6 +293,10 @@ 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));
@@ -2584,6 +2583,7 @@ Y.Base.mix(Y.M.editor_atto.Editor, [EditorFilepicker]);
"overlay",
"escape",
"event",
"event-key",
"event-simulate",
"event-custom",
"node-event-html5",
File diff suppressed because one or more lines are too long
@@ -210,11 +210,6 @@ 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');
@@ -296,6 +291,10 @@ 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));
@@ -2571,6 +2570,7 @@ Y.Base.mix(Y.M.editor_atto.Editor, [EditorFilepicker]);
"overlay",
"escape",
"event",
"event-key",
"event-simulate",
"event-custom",
"node-event-html5",
+4 -5
View File
@@ -210,11 +210,6 @@ 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');
@@ -296,6 +291,10 @@ 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));
@@ -7,6 +7,7 @@
"overlay",
"escape",
"event",
"event-key",
"event-simulate",
"event-custom",
"node-event-html5",