@jinntec/jinntap 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/jinn-tap.es.js +7 -6
- package/dist/jinn-tap.umd.js +1 -1
- package/package.json +1 -1
package/dist/jinn-tap.es.js
CHANGED
|
@@ -14009,12 +14009,13 @@ class lf extends HTMLElement {
|
|
|
14009
14009
|
applySlots(e) {
|
|
14010
14010
|
const t = this.querySelectorAll("slot");
|
|
14011
14011
|
for (const n of t) {
|
|
14012
|
-
const i = n.name, s = e.
|
|
14013
|
-
if (s) {
|
|
14014
|
-
const o =
|
|
14015
|
-
|
|
14016
|
-
|
|
14017
|
-
|
|
14012
|
+
const i = n.name, s = e.querySelectorAll(`[slot="${i}"]`);
|
|
14013
|
+
if (s.length > 0) {
|
|
14014
|
+
const o = n.parentNode;
|
|
14015
|
+
s.forEach((l) => {
|
|
14016
|
+
const a = document.createElement("div");
|
|
14017
|
+
a.innerHTML = l.outerHTML, Array.from(a.children).forEach((u) => o.insertBefore(u, n)), l.remove();
|
|
14018
|
+
});
|
|
14018
14019
|
}
|
|
14019
14020
|
}
|
|
14020
14021
|
return t.forEach((n) => n.remove()), e;
|
package/dist/jinn-tap.umd.js
CHANGED
|
@@ -210,5 +210,5 @@ img.ProseMirror-separator {
|
|
|
210
210
|
<tei-div>
|
|
211
211
|
<tei-p></tei-p>
|
|
212
212
|
</tei-div>
|
|
213
|
-
`,autofocus:!0,onCreate:()=>{this.dispatchContentChange(),this.dispatchEvent(new CustomEvent("ready"))},onUpdate:()=>this.dispatchContentChange()}),this.toolbar=new Ud(this,mn),this.attributePanel=new qd(this,mn),this.navigationPanel=new Kd(this,this.attributePanel);const i=this.getAttribute("url");i&&this.loadFromUrl(i)}dispatchContentChange(){this.dispatchEvent(new CustomEvent("content-change",{detail:{content:this.editor.getText(),xml:wo(this.editor)}}))}get content(){return this.editor.getText()}set content(e){this.editor.chain().focus().setContent(e).setTextSelection(0).run(),this.dispatchContentChange()}get xml(){return wo(this.editor)}focus(){this.editor.commands.focus()}get tiptap(){return this.editor}applySlots(e){const t=this.querySelectorAll("slot");for(const n of t){const i=n.name,s=e.
|
|
213
|
+
`,autofocus:!0,onCreate:()=>{this.dispatchContentChange(),this.dispatchEvent(new CustomEvent("ready"))},onUpdate:()=>this.dispatchContentChange()}),this.toolbar=new Ud(this,mn),this.attributePanel=new qd(this,mn),this.navigationPanel=new Kd(this,this.attributePanel);const i=this.getAttribute("url");i&&this.loadFromUrl(i)}dispatchContentChange(){this.dispatchEvent(new CustomEvent("content-change",{detail:{content:this.editor.getText(),xml:wo(this.editor)}}))}get content(){return this.editor.getText()}set content(e){this.editor.chain().focus().setContent(e).setTextSelection(0).run(),this.dispatchContentChange()}get xml(){return wo(this.editor)}focus(){this.editor.commands.focus()}get tiptap(){return this.editor}applySlots(e){const t=this.querySelectorAll("slot");for(const n of t){const i=n.name,s=e.querySelectorAll(`[slot="${i}"]`);if(s.length>0){const o=n.parentNode;s.forEach(l=>{const a=document.createElement("div");a.innerHTML=l.outerHTML,Array.from(a.children).forEach(u=>o.insertBefore(u,n)),l.remove()})}}return t.forEach(n=>n.remove()),e}}customElements.define("jinn-tap",No),Ke.JinnTap=No,Object.defineProperty(Ke,Symbol.toStringTag,{value:"Module"})});
|
|
214
214
|
//# sourceMappingURL=jinn-tap.umd.js.map
|