Every line of 'if para1 is the dom object for a paragraph' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
28 function isProppedParagraph(html) { 29 var trimmed = $.trim(html); 30 if (!trimmed) { 31 return false; 32 } 33 var node = $('<div>' + trimmed + '</div>')[0]; 34 var containsSingleP = node.firstChild === node.lastChild && 35 'p' === node.firstChild.nodeName.toLowerCase(); 36 if (containsSingleP) { 37 var kids = node.firstChild.children; 38 return (kids && 1 === kids.length && 39 'br' === kids[0].nodeName.toLowerCase()); 40 } 41 return false; 42 }
332 function isParagraph(node) { 333 return ( 334 node.nodeType === 1 && 335 node.nodeName === 'P' 336 ); 337 }
413 exports.isNewParagraphHelper = function isNewParagraphHelper(element) { 414 if (!element || element.localName !== "span") { 415 return false; 416 } 417 418 let style = element.getAttribute("style"); 419 return style && /z-index:\s*9999;/.test(style); 420 }
15 function isNewParagraphHelper(element) { 16 if (!element || element.localName !== "span") { 17 return false; 18 } 19 20 let style = element.getAttribute("style"); 21 return style && /z-index:\s*9999;/.test(style); 22 }
139 function isParagraph(token) { return token.type === 'paragraph_open'; }
23 async function renderParagraph (dom, domNode, hrNode) { 24 const text = await hrNode.get('c4o:hasContent') 25 const p = dom.createElement('p').setTextContent(text) 26 p.setAttribute('data-id', stripNamespace(hrNode.name)) 27 domNode.appendChild(p) 28 return p 29 }