me gustaría obtener la parte css en otro elemento.
probé con el siguiente código:
y = h.createElementNS("urn:oasis:names:tc:opendocument:xmln:text:1.0", "text:list") z = h.createElementNS("urn:oasis:names:tc:opendocument:xmlns:text:1.0", "text:list-item") w = h.createElementNS("urn:oasis:names:tc:opendocument:xmlns:text:1.0","text:p") document.styleSheets[0].insertRule('.bulletPoint::before { content: testABC ; }') // dz = h.createElementNS("urn:oasis:names:tc:opendocument:xmlns:text:1.0","text:span") // dz.innerHTML= TestInner w.setAttributeNS("urn:oasis:names:tc:opendocument:xmlns:text:1.0", "text:style-name", "T2") // text:style-name="T2" w.innerHTML = TestInner // w.appendChild(TextContent) w.setAttributeNS("urn:oasis:names:tc:opendocument:xmlns:text:1.0", "text:style-name", "P1") y.setAttributeNS("urn:oasis:names:tc:opendocument:xmlns:text:1.0", "text:style-name", 'L3') z.setAttribute( 'text|list[webodfhelper|counter-id="Ylist2793688918-level1-1"] > text|list-item > :not(text|list):first-child::before', 'content: "•"') // y.setAttributeNS("urn:oasis:names:tc:opendocument:xmlns:text:1.0", "text:continue-numbering", 'true') y.setAttributeNS("urn:oasis:names:tc:opendocument:xmlns:text:1.0", "counter-id", 'Ylist91444039228942-level1-1') w.setAttribute("class","bulletPoint")me sale un código de error que significa "|" no está todo en el siguiente paso: " z.setAttribute( 'text|list[webodfhelper|counter-id="Ylist2793688918-level1-1"] > text|list-item > :not(text|list):first-child ::antes', 'contenido: "•"')"
alguien puede ayudarme a obtener una línea " z.setAttribute('text|list[webodfhelper|counter-id="Ylist2793688918-level1-1"] > text|list-item > :not(text|list):first-child ::before', 'content: "•"')" en la instrucción "::before" de "z".