KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am trying to work with a simple WYSIWYG editor. JSLint is saying it has "Bad escaping of EOL". Since I am new to javascript I am having a hard time figuring out what it means, since I am working with code found online. Can anyone tell me please what I should be doing instead of ending the line with a slash? Here is the code in question: http://jsfiddle.net/spadez/KSA5e/9/ /* * WYSIWYG EDITOR BASED ON JQUERY RTE */ // define the rte light plugin (function ($) { if (typeof $.fn.rte === "undefined") { var defaults = { content_css_url: "rte.css", dot_net_button_class: null, max_height: 350 }; $.fn.rte = function (options) { $.fn.rte.html = function (iframe) { return iframe.contentWindow.document.getElementsByTagName("body")[0].innerHTML; }; // build main options before element iteration var opts = $.extend(defaults, options); // iterate and construct the RTEs return this.each(function () { var textarea = $(this); var iframe; var element_id = textarea.attr("id"); // enable design mode function enableDesignMode() { var content = textarea.val(); // Mozilla needs this to display caret if ($.trim(content) === '') { content = '<br />'; } // already created? show/hide if (iframe) { console.log("already created"); textarea.hide(); $(iframe).contents().find("body").html(content); $(iframe).show(); $("#toolbar-" + element_id).remove(); textarea.before(toolbar());
Tags (comma-separated)
Save Edits
Cancel