ninegrid2 6.1276.0 → 6.1278.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.
@@ -122487,20 +122487,34 @@ class nxEditor extends nxDiv {
122487
122487
  }
122488
122488
 
122489
122489
  connectedCallback() {
122490
- // nxDiv의 기본 초기화 수행 (innerHTML 보관 등)
122491
- if (super.connectedCallback()) {
122492
- this.#initEditor();
122493
- }
122490
+ if (super.connectedCallback()) this.#init();
122494
122491
  }
122495
122492
 
122496
- #initEditor = async () => {
122493
+ #init = async () => {
122494
+ const htmlTmpl = document.createElement("template");
122495
+ htmlTmpl.innerHTML = `
122496
+ <style>
122497
+ @import "https://cdn.ckeditor.com/ckeditor5/40.0.0/classic/ckeditor.css";
122498
+ @import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/nxEditor.css";
122499
+ ${ninegrid.getCustomPath(this,"nxEditor.css")}
122500
+ </style>
122501
+
122502
+ <textarea></textarea>
122503
+ `;
122504
+
122505
+ this.root.appendChild(htmlTmpl.content.cloneNode(true));
122506
+
122507
+ const textarea = this.root.querySelector("textarea");
122508
+
122497
122509
  // use-shadow="false" 권장 (CKEditor의 UI 레이아웃 때문)
122498
- const target = this.root;
122510
+ //const target = this.root;
122499
122511
 
122512
+ /**
122500
122513
  // 1. 에디터가 입혀질 기본 textarea 생성
122501
122514
  const textarea = document.createElement('textarea');
122502
122515
  textarea.name = this.getAttribute('name') || 'content';
122503
122516
  target.appendChild(textarea);
122517
+ */
122504
122518
 
122505
122519
  try {
122506
122520
  // 2. CKEditor 실행
@@ -122511,7 +122525,7 @@ class nxEditor extends nxDiv {
122511
122525
 
122512
122526
  // 3. 초기 값 설정 (originContents가 있으면 주입)
122513
122527
  if (this.originContents) {
122514
- this.#editor.setData(this.originContents);
122528
+ //this.#editor.setData(this.originContents);
122515
122529
  }
122516
122530
 
122517
122531
  // 4. 데이터 변경 감지 시 부모(nxDiv)의 changeHandler 호출
@@ -122483,20 +122483,34 @@ class nxEditor extends nxDiv {
122483
122483
  }
122484
122484
 
122485
122485
  connectedCallback() {
122486
- // nxDiv의 기본 초기화 수행 (innerHTML 보관 등)
122487
- if (super.connectedCallback()) {
122488
- this.#initEditor();
122489
- }
122486
+ if (super.connectedCallback()) this.#init();
122490
122487
  }
122491
122488
 
122492
- #initEditor = async () => {
122489
+ #init = async () => {
122490
+ const htmlTmpl = document.createElement("template");
122491
+ htmlTmpl.innerHTML = `
122492
+ <style>
122493
+ @import "https://cdn.ckeditor.com/ckeditor5/40.0.0/classic/ckeditor.css";
122494
+ @import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/nxEditor.css";
122495
+ ${ninegrid.getCustomPath(this,"nxEditor.css")}
122496
+ </style>
122497
+
122498
+ <textarea></textarea>
122499
+ `;
122500
+
122501
+ this.root.appendChild(htmlTmpl.content.cloneNode(true));
122502
+
122503
+ const textarea = this.root.querySelector("textarea");
122504
+
122493
122505
  // use-shadow="false" 권장 (CKEditor의 UI 레이아웃 때문)
122494
- const target = this.root;
122506
+ //const target = this.root;
122495
122507
 
122508
+ /**
122496
122509
  // 1. 에디터가 입혀질 기본 textarea 생성
122497
122510
  const textarea = document.createElement('textarea');
122498
122511
  textarea.name = this.getAttribute('name') || 'content';
122499
122512
  target.appendChild(textarea);
122513
+ */
122500
122514
 
122501
122515
  try {
122502
122516
  // 2. CKEditor 실행
@@ -122507,7 +122521,7 @@ class nxEditor extends nxDiv {
122507
122521
 
122508
122522
  // 3. 초기 값 설정 (originContents가 있으면 주입)
122509
122523
  if (this.originContents) {
122510
- this.#editor.setData(this.originContents);
122524
+ //this.#editor.setData(this.originContents);
122511
122525
  }
122512
122526
 
122513
122527
  // 4. 데이터 변경 감지 시 부모(nxDiv)의 changeHandler 호출
@@ -11,20 +11,34 @@ class nxEditor extends nxDiv {
11
11
  }
12
12
 
13
13
  connectedCallback() {
14
- // nxDiv의 기본 초기화 수행 (innerHTML 보관 등)
15
- if (super.connectedCallback()) {
16
- this.#initEditor();
17
- }
14
+ if (super.connectedCallback()) this.#init();
18
15
  }
19
16
 
20
- #initEditor = async () => {
17
+ #init = async () => {
18
+ const htmlTmpl = document.createElement("template");
19
+ htmlTmpl.innerHTML = `
20
+ <style>
21
+ @import "https://cdn.ckeditor.com/ckeditor5/40.0.0/classic/ckeditor.css";
22
+ @import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/nxEditor.css";
23
+ ${ninegrid.getCustomPath(this,"nxEditor.css")}
24
+ </style>
25
+
26
+ <textarea></textarea>
27
+ `;
28
+
29
+ this.root.appendChild(htmlTmpl.content.cloneNode(true));
30
+
31
+ const textarea = this.root.querySelector("textarea");
32
+
21
33
  // use-shadow="false" 권장 (CKEditor의 UI 레이아웃 때문)
22
- const target = this.root;
34
+ //const target = this.root;
23
35
 
36
+ /**
24
37
  // 1. 에디터가 입혀질 기본 textarea 생성
25
38
  const textarea = document.createElement('textarea');
26
39
  textarea.name = this.getAttribute('name') || 'content';
27
40
  target.appendChild(textarea);
41
+ */
28
42
 
29
43
  try {
30
44
  // 2. CKEditor 실행
@@ -35,7 +49,7 @@ class nxEditor extends nxDiv {
35
49
 
36
50
  // 3. 초기 값 설정 (originContents가 있으면 주입)
37
51
  if (this.originContents) {
38
- this.#editor.setData(this.originContents);
52
+ //this.#editor.setData(this.originContents);
39
53
  }
40
54
 
41
55
  // 4. 데이터 변경 감지 시 부모(nxDiv)의 changeHandler 호출
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.1276.0",
4
+ "version": "6.1278.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -11,20 +11,34 @@ class nxEditor extends nxDiv {
11
11
  }
12
12
 
13
13
  connectedCallback() {
14
- // nxDiv의 기본 초기화 수행 (innerHTML 보관 등)
15
- if (super.connectedCallback()) {
16
- this.#initEditor();
17
- }
14
+ if (super.connectedCallback()) this.#init();
18
15
  }
19
16
 
20
- #initEditor = async () => {
17
+ #init = async () => {
18
+ const htmlTmpl = document.createElement("template");
19
+ htmlTmpl.innerHTML = `
20
+ <style>
21
+ @import "https://cdn.ckeditor.com/ckeditor5/40.0.0/classic/ckeditor.css";
22
+ @import "https://cdn.jsdelivr.net/npm/ninegrid@${ninegrid.version}/dist/css/nxEditor.css";
23
+ ${ninegrid.getCustomPath(this,"nxEditor.css")}
24
+ </style>
25
+
26
+ <textarea></textarea>
27
+ `;
28
+
29
+ this.root.appendChild(htmlTmpl.content.cloneNode(true));
30
+
31
+ const textarea = this.root.querySelector("textarea");
32
+
21
33
  // use-shadow="false" 권장 (CKEditor의 UI 레이아웃 때문)
22
- const target = this.root;
34
+ //const target = this.root;
23
35
 
36
+ /**
24
37
  // 1. 에디터가 입혀질 기본 textarea 생성
25
38
  const textarea = document.createElement('textarea');
26
39
  textarea.name = this.getAttribute('name') || 'content';
27
40
  target.appendChild(textarea);
41
+ */
28
42
 
29
43
  try {
30
44
  // 2. CKEditor 실행
@@ -35,7 +49,7 @@ class nxEditor extends nxDiv {
35
49
 
36
50
  // 3. 초기 값 설정 (originContents가 있으면 주입)
37
51
  if (this.originContents) {
38
- this.#editor.setData(this.originContents);
52
+ //this.#editor.setData(this.originContents);
39
53
  }
40
54
 
41
55
  // 4. 데이터 변경 감지 시 부모(nxDiv)의 changeHandler 호출