With jquery, I need to get <details> content, but without <summary> part. Is there any way to do it without regex to remove summary content?
It's for a tinymce plugin.
The content may be in a single tag like :
<details>
<summary>blablabla</summary>
<div>
... / ...
</div>
</details>
or with multiple childre like this:
<details>
<summary>blablabla</summary>
<p>
... / ...
</p>
<p>
... / ...
</p>
<p>
... / ...
</p>
</details>
Here is what I have:
var nodeType = 'details';
var summary = '';
var details = '';
var selectionNode = tinymce.DOM.getParent(editor.selection.getNode(), nodeType);
if( ( selectionNode !== null ) && selectionNode.nodeName.toLowerCase() === nodeType ){
summary = // here I must get summary content
details = // here I must get details content, without summary part
}
thanks if you have any clue to help me ;-)