diff --git a/Makefile b/Makefile index f5c7f7ba..ca89896b 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,6 @@ JS_FILES = src/wysihtml5.js \ src/quirks/clean_pasted_html.js \ src/quirks/ensure_proper_clearing.js \ src/quirks/get_correct_inner_html.js \ - src/quirks/insert_line_break_on_return.js \ src/quirks/redraw.js \ src/selection/selection.js \ src/selection/html_applier.js \ diff --git a/examples/advanced.html b/examples/advanced.html index d4abb767..2ecb2656 100644 --- a/examples/advanced.html +++ b/examples/advanced.html @@ -38,7 +38,7 @@ #toolbar, textarea { - width: 900px; + width: 920px; padding: 5px; -webkit-box-sizing: border-box; -ms-box-sizing: border-box; @@ -91,6 +91,7 @@

wysihtml5 - Advanced Editor Example

insert image | h1 | h2 | + p | insertUnorderedList | insertOrderedList | red | @@ -139,9 +140,10 @@

Events:

"; output = "

foobar

"; @@ -439,7 +439,7 @@ if (wysihtml5.browser.supported()) { var that = this; var editor = new wysihtml5.Editor(this.textareaElement); - editor.observe("load", function() { + editor.on("load", function() { var html = '', composerElement = that.getComposerElement(), textareaElement = that.textareaElement; @@ -474,7 +474,7 @@ if (wysihtml5.browser.supported()) { stylesheets: stylesheetUrls }); - editor.observe("load", function() { + editor.on("load", function() { var iframeElement = that.getIframeElement(), iframeDoc = iframeElement.contentWindow.document, linkElements = iframeDoc.getElementsByTagName("link"); @@ -500,7 +500,7 @@ if (wysihtml5.browser.supported()) { supportTouchDevices: false }); - editor.observe("load", function() { + editor.on("load", function() { ok(!that.getIframeElement(), "No editor iframe has been inserted"); equal(that.textareaElement.style.display, "", "Textarea is visible"); @@ -518,7 +518,7 @@ if (wysihtml5.browser.supported()) { var editor = new wysihtml5.Editor(textareaElement); var that = this; - editor.observe("load", function() { + editor.on("load", function() { ok(!document.querySelector("input[name='_wysihtml5_mode']"), "No hidden _wysihtml5_mode input has been created"); ok(that.getIframeElement(), "Editor's iframe has been created"); equal(textareaElement.style.display, "none", "Textarea is not visible"); diff --git a/test/incompatible_test.js b/test/incompatible_test.js index f9005d0c..e0c86294 100644 --- a/test/incompatible_test.js +++ b/test/incompatible_test.js @@ -24,7 +24,7 @@ asyncTest("Basic test", function() { var oldInputsLength = document.getElementsByTagName("input").length; var editor = new wysihtml5.Editor(this.textareaElement); - editor.observe("load", function() { + editor.on("load", function() { ok(true, "'load' event correctly triggered"); ok(!wysihtml5.dom.hasClass(document.body, "wysihtml5-supported"), " didn't receive the 'wysihtml5-supported' class"); ok(!editor.isCompatible(), "isCompatible returns false when rich text editing is not correctly supported in the current browser"); @@ -41,15 +41,15 @@ asyncTest("Basic test", function() { editor.clear(); equal(that.textareaElement.value, ""); - editor.observe("focus", function() { + editor.on("focus", function() { ok(true, "Generic 'focus' event fired"); }); - editor.observe("focus:textarea", function() { + editor.on("focus:textarea", function() { ok(true, "Specific 'focus:textarea' event fired"); }); - editor.observe("focus:composer", function() { + editor.on("focus:composer", function() { ok(false, "Specific 'focus:composer' event fired, and that's wrong, there shouldn't be a composer element/view"); }); diff --git a/test/index.html b/test/index.html index efd0cb94..21aab4c3 100644 --- a/test/index.html +++ b/test/index.html @@ -45,7 +45,6 @@ -