diff --git a/app/src/main/assets/RichTextEditor/editor.html b/app/src/main/assets/RichTextEditor/editor.html index c6fa5df..f54875d 100755 --- a/app/src/main/assets/RichTextEditor/editor.html +++ b/app/src/main/assets/RichTextEditor/editor.html @@ -55,10 +55,10 @@ } window.onload = function () { - var dummyP = $("#dummyP"); - var pMargin = parseInt(dummyP.css("marginTop")); + var dummyP = $('#dummyP'); + var pMargin = parseInt(dummyP.css('marginTop')); var hr = $('#hr'); - var hrHeight = hr.outerHeight() + parseInt(hr.css("marginTop")) + parseInt(hr.css("marginBottom")); + var hrHeight = hr.outerHeight() + parseInt(hr.css('marginTop')) + parseInt(hr.css('marginBottom')); var contentHeight = window.innerHeight - pMargin - $('#title').outerHeight() - hrHeight; $('#content').css('height', contentHeight + 'px'); tinymce.init({ @@ -66,7 +66,7 @@ remove_trailing_brs: false, element_format: 'html', allow_unsafe_link_target: true, - plugins: "lists", + plugins: 'lists', toolbar: false, menubar: false, inline: true @@ -115,7 +115,7 @@ if (result) { return result[0]; } else { - return ""; + return ''; } } @@ -130,14 +130,14 @@ } function toggleBulletList() { - tinyMCE.editors[0].execCommand("InsertUnorderedList", false) + tinyMCE.editors[0].execCommand('InsertUnorderedList', false) var listState = getListState(); listState = listState.toLowerCase() === 'ul'; nativeCallbackHandler.onFormatChange(JSON.stringify({bullet: listState})); } function toggleOrderedList() { - tinyMCE.editors[0].execCommand("InsertOrderedList", false) + tinyMCE.editors[0].execCommand('InsertOrderedList', false) var listState = getListState(); listState = listState.toLowerCase() === 'ol'; nativeCallbackHandler.onFormatChange(JSON.stringify({ordered: listState})); @@ -160,17 +160,17 @@ } function enable() { - document.addEventListener("selectionchange", selectionChangeHandler, false); - document.removeEventListener("click", clickHandeler, false); + document.addEventListener('selectionchange', selectionChangeHandler, false); + document.removeEventListener('click', clickHandeler, false); tinyMCE.editors[0].setMode('design'); titleDiv.setAttribute("contenteditable", true); } function disable() { - document.removeEventListener("selectionchange", selectionChangeHandler, false); - document.addEventListener("click", clickHandeler, false); + document.removeEventListener('selectionchange', selectionChangeHandler, false); + document.addEventListener('click', clickHandeler, false); tinyMCE.editors[0].setMode('readonly'); - titleDiv.setAttribute("contenteditable", false); + titleDiv.setAttribute('contenteditable', false); } function clickHandeler(e) { @@ -236,7 +236,7 @@ if (lists.length > 0) { return lists[0].nodeName.toLowerCase(); } else { - return ""; + return ''; } }