You have an open string literal. JavaScript strings are not multiline by default.
var modalcontent = { description1 : '<div id = "description"><div class = "tbc"> '+ '<label class = "tbc" for = "tbc">Description</label>'+ '</div>'+ '<div class = "tbc">'+ '<input type = "text" class = "tbc" name = "description" id = "tbc" placeholder = "Enter description">'+ '</div>'+ '</div>'+ '' }
(violin)
Alternatively, you can create a multi-line string using the \ character, which only work in new implementations. See this related question or language specification .
Note. This is usually not the best idea to store HTML in lines, which makes it difficult to debug and work. You can usually use patterns. It is not that there are no good use cases; it rarely happens.
source share