diff --git a/js/macros/edit.js b/js/macros/edit.js index ee6e5a924..99c9ffb66 100644 --- a/js/macros/edit.js +++ b/js/macros/edit.js @@ -184,56 +184,68 @@ TextEditor.prototype.getContent = function() { break; } } - var type = "div"; - if(field === "text") { - type = "pre"; - } var attributes = { - "contenteditable": true, - "class": ["tw-edit-field"] - }; - return [Renderer.ElementNode(type,attributes,[Renderer.TextNode(value)])]; -}; - -TextEditor.prototype.getText = function(text,node) { - if(node.nodeType === window.Node.TEXT_NODE) { - text.push(node.data); - } else if(node.nodeType === window.Node.ELEMENT_NODE && node.nodeName.toLowerCase() === "br") { - // Firefox has `
` tags instead of line feeds - text.push("\n"); - } - if(node.hasChildNodes && node.hasChildNodes()) { - for(var t=0; t