Hi Mike,

Thanks for your feedback. Your solution does work in the scenario I described where only one link is used. However it is possible to return multiple elements for example:

<taconite>
 <append>
  <a href="...">hello</a>
  <a href="...">hi</a>
 </append>
</taconite>

To provide some context, I am integrating taconite into a component framework and do not have much control over the commands and their content.

Hmm would it work to "unwrap" (does that even make sense) the div contents?

kind regards

bob


Mike Alsup wrote:
In order to do this taconite places the CDATA content inside a div
element. However after the command is executed the div is left in the DOM.

So after a bit of back and forth between browser and server we end up
with a large hierarchy of divs.

Hi Bob,

Could you test this function to see if it fixes the issue for you?
(just replace the current one in Taconite)

        function handleCDATA(s) {
            var el = document.createElement(cdataWrap);
            el.innerHTML = s;

            // remove wrapper node if possible
            var $el = $(el), $ch = $el.children();
            if ($ch.size() == 1)
                return $ch[0];
            return el;
        };


Thanks.

Mike


Reply via email to