MDL-41993 Atto: Always clean/update the textarea when the content is changed
authorDamyon Wiese <damyon@moodle.com>
Wed, 9 Oct 2013 03:08:06 +0000 (11:08 +0800)
committerDamyon Wiese <damyon@moodle.com>
Wed, 9 Oct 2013 03:08:06 +0000 (11:08 +0800)
60 files changed:
lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button-debug.js
lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button-min.js
lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button.js
lib/editor/atto/plugins/bold/yui/src/button/js/button.js
lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button-debug.js
lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button-min.js
lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button.js
lib/editor/atto/plugins/clear/yui/src/button/js/button.js
lib/editor/atto/plugins/image/yui/build/moodle-atto_image-button/moodle-atto_image-button-debug.js
lib/editor/atto/plugins/image/yui/build/moodle-atto_image-button/moodle-atto_image-button-min.js
lib/editor/atto/plugins/image/yui/build/moodle-atto_image-button/moodle-atto_image-button.js
lib/editor/atto/plugins/image/yui/src/button/js/button.js
lib/editor/atto/plugins/indent/yui/build/moodle-atto_indent-button/moodle-atto_indent-button-debug.js
lib/editor/atto/plugins/indent/yui/build/moodle-atto_indent-button/moodle-atto_indent-button-min.js
lib/editor/atto/plugins/indent/yui/build/moodle-atto_indent-button/moodle-atto_indent-button.js
lib/editor/atto/plugins/indent/yui/src/button/js/button.js
lib/editor/atto/plugins/italic/yui/build/moodle-atto_italic-button/moodle-atto_italic-button-debug.js
lib/editor/atto/plugins/italic/yui/build/moodle-atto_italic-button/moodle-atto_italic-button-min.js
lib/editor/atto/plugins/italic/yui/build/moodle-atto_italic-button/moodle-atto_italic-button.js
lib/editor/atto/plugins/italic/yui/src/button/js/button.js
lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button-debug.js
lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button-min.js
lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button.js
lib/editor/atto/plugins/link/yui/src/button/js/button.js
lib/editor/atto/plugins/media/yui/build/moodle-atto_media-button/moodle-atto_media-button-debug.js
lib/editor/atto/plugins/media/yui/build/moodle-atto_media-button/moodle-atto_media-button-min.js
lib/editor/atto/plugins/media/yui/build/moodle-atto_media-button/moodle-atto_media-button.js
lib/editor/atto/plugins/media/yui/src/button/js/button.js
lib/editor/atto/plugins/orderedlist/yui/build/moodle-atto_orderedlist-button/moodle-atto_orderedlist-button-debug.js
lib/editor/atto/plugins/orderedlist/yui/build/moodle-atto_orderedlist-button/moodle-atto_orderedlist-button-min.js
lib/editor/atto/plugins/orderedlist/yui/build/moodle-atto_orderedlist-button/moodle-atto_orderedlist-button.js
lib/editor/atto/plugins/orderedlist/yui/src/button/js/button.js
lib/editor/atto/plugins/outdent/yui/build/moodle-atto_outdent-button/moodle-atto_outdent-button-debug.js
lib/editor/atto/plugins/outdent/yui/build/moodle-atto_outdent-button/moodle-atto_outdent-button-min.js
lib/editor/atto/plugins/outdent/yui/build/moodle-atto_outdent-button/moodle-atto_outdent-button.js
lib/editor/atto/plugins/outdent/yui/src/button/js/button.js
lib/editor/atto/plugins/strike/yui/build/moodle-atto_strike-button/moodle-atto_strike-button-debug.js
lib/editor/atto/plugins/strike/yui/build/moodle-atto_strike-button/moodle-atto_strike-button-min.js
lib/editor/atto/plugins/strike/yui/build/moodle-atto_strike-button/moodle-atto_strike-button.js
lib/editor/atto/plugins/strike/yui/src/button/js/button.js
lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button-debug.js
lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button-min.js
lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button.js
lib/editor/atto/plugins/title/yui/src/button/js/button.js
lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button-debug.js
lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button-min.js
lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button.js
lib/editor/atto/plugins/underline/yui/src/button/js/button.js
lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button-debug.js
lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button-min.js
lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button.js
lib/editor/atto/plugins/unlink/yui/src/button/js/button.js
lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button-debug.js
lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button-min.js
lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button.js
lib/editor/atto/plugins/unorderedlist/yui/src/button/js/button.js
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

index 254c68d..5e00ad3 100644 (file)
Binary files a/lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button-debug.js and b/lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button-debug.js differ
index 14ec201..b83c7a8 100644 (file)
Binary files a/lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button-min.js and b/lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button-min.js differ
index 254c68d..5e00ad3 100644 (file)
Binary files a/lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button.js and b/lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button.js differ
index 0522419..f48b4ec 100644 (file)
@@ -28,6 +28,8 @@ M.atto_bold = M.atto_bold || {
                 M.editor_atto.focus(elementid);
             }
             document.execCommand('bold', false, null);
+            // Clean the YUI ids from the HTML.
+            M.editor_atto.text_updated(elementid);
         };
 
         M.editor_atto.add_toolbar_button(params.elementid, 'bold', params.icon, params.group, click);
index 0efa72c..5a4187c 100644 (file)
Binary files a/lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button-debug.js and b/lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button-debug.js differ
index 4a1ad97..a8c661c 100644 (file)
Binary files a/lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button-min.js and b/lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button-min.js differ
index 0efa72c..5a4187c 100644 (file)
Binary files a/lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button.js and b/lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button.js differ
index 77d6d1e..5630e0a 100644 (file)
@@ -28,6 +28,8 @@ M.atto_clear = M.atto_clear || {
                 M.editor_atto.focus(elementid);
             }
             document.execCommand('removeFormat', false);
+            // Clean the YUI ids from the HTML.
+            M.editor_atto.text_updated(elementid);
         };
 
         M.editor_atto.add_toolbar_button(params.elementid, 'clear', params.icon, params.group, click);
index d8c624d..7d1a545 100644 (file)
Binary files a/lib/editor/atto/plugins/image/yui/build/moodle-atto_image-button/moodle-atto_image-button-debug.js and b/lib/editor/atto/plugins/image/yui/build/moodle-atto_image-button/moodle-atto_image-button-debug.js differ
index d489732..66ecfab 100644 (file)
Binary files a/lib/editor/atto/plugins/image/yui/build/moodle-atto_image-button/moodle-atto_image-button-min.js and b/lib/editor/atto/plugins/image/yui/build/moodle-atto_image-button/moodle-atto_image-button-min.js differ
index d8c624d..7d1a545 100644 (file)
Binary files a/lib/editor/atto/plugins/image/yui/build/moodle-atto_image-button/moodle-atto_image-button.js and b/lib/editor/atto/plugins/image/yui/build/moodle-atto_image-button/moodle-atto_image-button.js differ
index 791d224..fb86296 100644 (file)
@@ -111,7 +111,7 @@ M.atto_image = M.atto_image || {
             image.src = params.url;
         }
     },
-    set_image : function(e) {
+    set_image : function(e, elementid) {
         e.preventDefault();
         M.atto_image.dialogue.hide();
 
@@ -141,6 +141,8 @@ M.atto_image = M.atto_image || {
             } else {
                 document.execCommand('insertHTML', false, imagehtml);
             }
+            // Clean the YUI ids from the HTML.
+            M.editor_atto.text_updated(elementid);
         }
     },
     get_form_content : function(elementid) {
@@ -172,7 +174,7 @@ M.atto_image = M.atto_image || {
                              '</form>' +
                              '<hr/>' + M.util.get_string('accessibilityhint', 'atto_image'));
 
-        content.one('#atto_image_urlentrysubmit').on('click', M.atto_image.set_image);
+        content.one('#atto_image_urlentrysubmit').on('click', M.atto_image.set_image, this, elementid);
         content.one('#openimagebrowser').on('click', M.atto_image.open_filepicker);
         return content;
     }
index aa393bf..f952bb0 100644 (file)
Binary files a/lib/editor/atto/plugins/indent/yui/build/moodle-atto_indent-button/moodle-atto_indent-button-debug.js and b/lib/editor/atto/plugins/indent/yui/build/moodle-atto_indent-button/moodle-atto_indent-button-debug.js differ
index 6e10e44..cd35231 100644 (file)
Binary files a/lib/editor/atto/plugins/indent/yui/build/moodle-atto_indent-button/moodle-atto_indent-button-min.js and b/lib/editor/atto/plugins/indent/yui/build/moodle-atto_indent-button/moodle-atto_indent-button-min.js differ
index aa393bf..f952bb0 100644 (file)
Binary files a/lib/editor/atto/plugins/indent/yui/build/moodle-atto_indent-button/moodle-atto_indent-button.js and b/lib/editor/atto/plugins/indent/yui/build/moodle-atto_indent-button/moodle-atto_indent-button.js differ
index 4e6ce3a..79b73a5 100644 (file)
@@ -28,6 +28,8 @@ M.atto_indent = M.atto_indent || {
                 M.editor_atto.focus(elementid);
             }
             document.execCommand('indent', false, null);
+            // Clean the YUI ids from the HTML.
+            M.editor_atto.text_updated(elementid);
         };
 
         M.editor_atto.add_toolbar_button(params.elementid, 'indent', params.icon, params.group, click);
index 78b18b2..1cab99f 100644 (file)
Binary files a/lib/editor/atto/plugins/italic/yui/build/moodle-atto_italic-button/moodle-atto_italic-button-debug.js and b/lib/editor/atto/plugins/italic/yui/build/moodle-atto_italic-button/moodle-atto_italic-button-debug.js differ
index 8e51967..5458167 100644 (file)
Binary files a/lib/editor/atto/plugins/italic/yui/build/moodle-atto_italic-button/moodle-atto_italic-button-min.js and b/lib/editor/atto/plugins/italic/yui/build/moodle-atto_italic-button/moodle-atto_italic-button-min.js differ
index 78b18b2..1cab99f 100644 (file)
Binary files a/lib/editor/atto/plugins/italic/yui/build/moodle-atto_italic-button/moodle-atto_italic-button.js and b/lib/editor/atto/plugins/italic/yui/build/moodle-atto_italic-button/moodle-atto_italic-button.js differ
index d7da568..349ad94 100644 (file)
@@ -28,6 +28,8 @@ M.atto_italic = M.atto_italic || {
                 M.editor_atto.focus(elementid);
             }
             document.execCommand('italic', false, null);
+            // Clean the YUI ids from the HTML.
+            M.editor_atto.text_updated(elementid);
         };
 
         M.editor_atto.add_toolbar_button(params.elementid, 'italic', params.icon, params.group, click);
index 7f88586..87bb3d8 100644 (file)
Binary files a/lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button-debug.js and b/lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button-debug.js differ
index 1434aed..f260079 100644 (file)
Binary files a/lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button-min.js and b/lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button-min.js differ
index 7f88586..87bb3d8 100644 (file)
Binary files a/lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button.js and b/lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button.js differ
index 71d74b9..7437bad 100644 (file)
@@ -156,7 +156,7 @@ M.atto_link = M.atto_link || {
      * @method set_link
      * @param Event e
      */
-    set_link : function(e) {
+    set_link : function(e, elementid) {
         var input,
             target,
             selectednode,
@@ -191,6 +191,8 @@ M.atto_link = M.atto_link || {
                     anchornode.removeAttribute('target');
                 }
             });
+            // Clean the YUI ids from the HTML.
+            M.editor_atto.text_updated(elementid);
         }
     },
 
@@ -252,7 +254,7 @@ M.atto_link = M.atto_link || {
                              '</form>' +
                              '<hr/>' + M.util.get_string('accessibilityhint', 'atto_link'));
 
-        content.one('#atto_link_urlentrysubmit').on('click', M.atto_link.set_link);
+        content.one('#atto_link_urlentrysubmit').on('click', M.atto_link.set_link, this, elementid);
         content.one('#openlinkbrowser').on('click', M.atto_link.open_filepicker);
         return content;
     }
index e4fcc22..5b5541d 100644 (file)
Binary files a/lib/editor/atto/plugins/media/yui/build/moodle-atto_media-button/moodle-atto_media-button-debug.js and b/lib/editor/atto/plugins/media/yui/build/moodle-atto_media-button/moodle-atto_media-button-debug.js differ
index 5faab6e..d7136e9 100644 (file)
Binary files a/lib/editor/atto/plugins/media/yui/build/moodle-atto_media-button/moodle-atto_media-button-min.js and b/lib/editor/atto/plugins/media/yui/build/moodle-atto_media-button/moodle-atto_media-button-min.js differ
index e4fcc22..5b5541d 100644 (file)
Binary files a/lib/editor/atto/plugins/media/yui/build/moodle-atto_media-button/moodle-atto_media-button.js and b/lib/editor/atto/plugins/media/yui/build/moodle-atto_media-button/moodle-atto_media-button.js differ
index 70fe607..6e078ba 100644 (file)
@@ -68,7 +68,7 @@ M.atto_media = M.atto_media || {
             input.set('value', params.file);
         }
     },
-    set_media : function(e) {
+    set_media : function(e, elementid) {
         e.preventDefault();
         M.atto_media.dialogue.hide();
 
@@ -86,6 +86,8 @@ M.atto_media = M.atto_media || {
             } else {
                 document.execCommand('insertHTML', false, mediahtml);
             }
+            // Clean the YUI ids from the HTML.
+            M.editor_atto.text_updated(elementid);
         }
     },
     get_form_content : function(elementid) {
@@ -107,7 +109,7 @@ M.atto_media = M.atto_media || {
                              '</form>' +
                              '<hr/>' + M.util.get_string('accessibilityhint', 'atto_media'));
 
-        content.one('#atto_media_urlentrysubmit').on('click', M.atto_media.set_media);
+        content.one('#atto_media_urlentrysubmit').on('click', M.atto_media.set_media, this, elementid);
         content.one('#openmediabrowser').on('click', M.atto_media.open_browser);
         return content;
     }
index a2cc475..4b19e1e 100644 (file)
Binary files a/lib/editor/atto/plugins/orderedlist/yui/build/moodle-atto_orderedlist-button/moodle-atto_orderedlist-button-debug.js and b/lib/editor/atto/plugins/orderedlist/yui/build/moodle-atto_orderedlist-button/moodle-atto_orderedlist-button-debug.js differ
index d5cc764..c1863bd 100644 (file)
Binary files a/lib/editor/atto/plugins/orderedlist/yui/build/moodle-atto_orderedlist-button/moodle-atto_orderedlist-button-min.js and b/lib/editor/atto/plugins/orderedlist/yui/build/moodle-atto_orderedlist-button/moodle-atto_orderedlist-button-min.js differ
index a2cc475..4b19e1e 100644 (file)
Binary files a/lib/editor/atto/plugins/orderedlist/yui/build/moodle-atto_orderedlist-button/moodle-atto_orderedlist-button.js and b/lib/editor/atto/plugins/orderedlist/yui/build/moodle-atto_orderedlist-button/moodle-atto_orderedlist-button.js differ
index 93a00c0..eb3f834 100644 (file)
@@ -28,6 +28,8 @@ M.atto_orderedlist = M.atto_orderedlist || {
                 M.editor_atto.focus(elementid);
             }
             document.execCommand('insertOrderedList', false, null);
+            // Clean the YUI ids from the HTML.
+            M.editor_atto.text_updated(elementid);
         };
 
         M.editor_atto.add_toolbar_button(params.elementid, 'orderedlist', params.icon, params.group, click);
index c0a4827..4224011 100644 (file)
Binary files a/lib/editor/atto/plugins/outdent/yui/build/moodle-atto_outdent-button/moodle-atto_outdent-button-debug.js and b/lib/editor/atto/plugins/outdent/yui/build/moodle-atto_outdent-button/moodle-atto_outdent-button-debug.js differ
index 16df6c4..f86a8cd 100644 (file)
Binary files a/lib/editor/atto/plugins/outdent/yui/build/moodle-atto_outdent-button/moodle-atto_outdent-button-min.js and b/lib/editor/atto/plugins/outdent/yui/build/moodle-atto_outdent-button/moodle-atto_outdent-button-min.js differ
index c0a4827..4224011 100644 (file)
Binary files a/lib/editor/atto/plugins/outdent/yui/build/moodle-atto_outdent-button/moodle-atto_outdent-button.js and b/lib/editor/atto/plugins/outdent/yui/build/moodle-atto_outdent-button/moodle-atto_outdent-button.js differ
index 96e8a9c..d3d67af 100644 (file)
@@ -28,6 +28,8 @@ M.atto_outdent = M.atto_outdent || {
                 M.editor_atto.focus(elementid);
             }
             document.execCommand('outdent', false, null);
+            // Clean the YUI ids from the HTML.
+            M.editor_atto.text_updated(elementid);
         };
 
         M.editor_atto.add_toolbar_button(params.elementid, 'outdent', params.icon, params.group, click);
index 3807083..d2a0942 100644 (file)
Binary files a/lib/editor/atto/plugins/strike/yui/build/moodle-atto_strike-button/moodle-atto_strike-button-debug.js and b/lib/editor/atto/plugins/strike/yui/build/moodle-atto_strike-button/moodle-atto_strike-button-debug.js differ
index 873cb8c..067c1db 100644 (file)
Binary files a/lib/editor/atto/plugins/strike/yui/build/moodle-atto_strike-button/moodle-atto_strike-button-min.js and b/lib/editor/atto/plugins/strike/yui/build/moodle-atto_strike-button/moodle-atto_strike-button-min.js differ
index 3807083..d2a0942 100644 (file)
Binary files a/lib/editor/atto/plugins/strike/yui/build/moodle-atto_strike-button/moodle-atto_strike-button.js and b/lib/editor/atto/plugins/strike/yui/build/moodle-atto_strike-button/moodle-atto_strike-button.js differ
index c69ce0d..8e8505e 100644 (file)
@@ -28,6 +28,8 @@ M.atto_strike = M.atto_strike || {
                 M.editor_atto.focus(elementid);
             }
             document.execCommand('strikeThrough', false, null);
+            // Clean the YUI ids from the HTML.
+            M.editor_atto.text_updated(elementid);
         };
 
         M.editor_atto.add_toolbar_button(params.elementid, 'strike', params.icon, params.group, click);
index 9297739..a66644f 100644 (file)
Binary files a/lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button-debug.js and b/lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button-debug.js differ
index 6465b9c..32aae11 100644 (file)
Binary files a/lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button-min.js and b/lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button-min.js differ
index 9297739..a66644f 100644 (file)
Binary files a/lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button.js and b/lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button.js differ
index c2d6d9f..1f5de11 100644 (file)
@@ -74,5 +74,7 @@ M.atto_title = M.atto_title || {
             M.editor_atto.focus(elementid);
         }
         document.execCommand('formatBlock', false, node);
+        // Clean the YUI ids from the HTML.
+        M.editor_atto.text_updated(elementid);
     }
 };
index 218a670..1566a0f 100644 (file)
Binary files a/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button-debug.js and b/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button-debug.js differ
index 86d3a2f..5880711 100644 (file)
Binary files a/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button-min.js and b/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button-min.js differ
index 218a670..1566a0f 100644 (file)
Binary files a/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button.js and b/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button.js differ
index 9734610..1ea68b0 100644 (file)
@@ -28,6 +28,8 @@ M.atto_underline = M.atto_underline || {
                 M.editor_atto.focus(elementid);
             }
             document.execCommand('underline', false, null);
+            // Clean the YUI ids from the HTML.
+            M.editor_atto.text_updated(elementid);
         };
 
         M.editor_atto.add_toolbar_button(params.elementid, 'underline', params.icon, params.group, click);
index 89959a8..b3d87f5 100644 (file)
Binary files a/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button-debug.js and b/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button-debug.js differ
index c306b0a..ebfb57b 100644 (file)
Binary files a/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button-min.js and b/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button-min.js differ
index 89959a8..b3d87f5 100644 (file)
Binary files a/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button.js and b/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button.js differ
index 73923fb..e8cc4fd 100644 (file)
@@ -28,6 +28,8 @@ M.atto_unlink = M.atto_unlink || {
                 M.editor_atto.focus(elementid);
             }
             document.execCommand('unlink', false, null);
+            // Clean the YUI ids from the HTML.
+            M.editor_atto.text_updated(elementid);
         };
 
         M.editor_atto.add_toolbar_button(params.elementid, 'unlink', params.icon, params.group, click);
index e430b83..6b9309a 100644 (file)
Binary files a/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button-debug.js and b/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button-debug.js differ
index dc606fc..1498365 100644 (file)
Binary files a/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button-min.js and b/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button-min.js differ
index e430b83..6b9309a 100644 (file)
Binary files a/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button.js and b/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button.js differ
index 6e1d30c..9a3895d 100644 (file)
@@ -28,6 +28,8 @@ M.atto_unorderedlist = M.atto_unorderedlist || {
                 M.editor_atto.focus(elementid);
             }
             document.execCommand('insertUnorderedList', false, null);
+            // Clean the YUI ids from the HTML.
+            M.editor_atto.text_updated(elementid);
         };
 
         M.editor_atto.add_toolbar_button(params.elementid, 'unorderedlist', params.icon, params.group, click);
index 966612f..eb566d6 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 bff0fba..cb8c4ad 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 966612f..eb566d6 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 7f92c85..1038280 100644 (file)
@@ -382,6 +382,16 @@ M.editor_atto = M.editor_atto || {
         M.editor_atto.filepickeroptions[params.elementid] = params.filepickeroptions;
     },
 
+    /**
+     * The text in the contenteditable region has been updated,
+     * clean and copy the buffer to the text area.
+     * @param string elementid - the id of the textarea we created this editor from.
+     */
+    text_updated : function(elementid) {
+        var textarea = Y.one('#' + elementid);
+        textarea.set('value', this.get_clean_html(elementid));
+    },
+
     /**
      * Remove all YUI ids from the generated HTML.
      * @param string elementid - the id of the textarea we created this editor from.