ninegrid2 6.1335.0 → 6.1338.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/bundle.cjs.js +13 -8
- package/dist/bundle.esm.js +13 -8
- package/dist/nx/nxEditor.js +13 -8
- package/package.json +1 -1
- package/src/nx/nxEditor.js +13 -8
package/dist/bundle.cjs.js
CHANGED
|
@@ -55344,25 +55344,30 @@ class nxEditor extends nxDiv {
|
|
|
55344
55344
|
}
|
|
55345
55345
|
|
|
55346
55346
|
#updateMenuState(editor) {
|
|
55347
|
+
// 1. 일반 커맨드 버튼 상태 업데이트
|
|
55347
55348
|
this.shadowRoot.querySelectorAll('[data-cmd]').forEach(btn => {
|
|
55348
55349
|
if (editor.isActive(btn.dataset.cmd)) btn.classList.add('is-active');
|
|
55349
55350
|
else btn.classList.remove('is-active');
|
|
55350
55351
|
});
|
|
55351
55352
|
|
|
55353
|
+
// 2. 정렬 상태 업데이트
|
|
55352
55354
|
this.shadowRoot.querySelectorAll('[data-align]').forEach(btn => {
|
|
55353
55355
|
if (editor.isActive({ textAlign: btn.dataset.align })) btn.classList.add('is-active');
|
|
55354
55356
|
else btn.classList.remove('is-active');
|
|
55355
55357
|
});
|
|
55356
55358
|
|
|
55357
|
-
//
|
|
55358
|
-
const
|
|
55359
|
-
console.log(fontSize);
|
|
55359
|
+
// 3. 폰트 사이즈 업데이트
|
|
55360
|
+
const attrs = editor.getAttributes('textStyle');
|
|
55360
55361
|
const select = this.shadowRoot.querySelector('#font-size');
|
|
55361
|
-
|
|
55362
|
-
|
|
55363
|
-
|
|
55364
|
-
|
|
55365
|
-
|
|
55362
|
+
if (select) {
|
|
55363
|
+
select.value = attrs.fontSize || '14px'; // 값이 없으면 기본값
|
|
55364
|
+
}
|
|
55365
|
+
|
|
55366
|
+
// 4. 글자 색상 업데이트 (추가된 부분)
|
|
55367
|
+
const colorPicker = this.shadowRoot.querySelector('#color-picker');
|
|
55368
|
+
if (colorPicker) {
|
|
55369
|
+
// Tiptap에서 가져온 색상값이 있으면 적용, 없으면 기본 검정색(#000000)
|
|
55370
|
+
colorPicker.value = attrs.color || '#000000';
|
|
55366
55371
|
}
|
|
55367
55372
|
}
|
|
55368
55373
|
|
package/dist/bundle.esm.js
CHANGED
|
@@ -55340,25 +55340,30 @@ class nxEditor extends nxDiv {
|
|
|
55340
55340
|
}
|
|
55341
55341
|
|
|
55342
55342
|
#updateMenuState(editor) {
|
|
55343
|
+
// 1. 일반 커맨드 버튼 상태 업데이트
|
|
55343
55344
|
this.shadowRoot.querySelectorAll('[data-cmd]').forEach(btn => {
|
|
55344
55345
|
if (editor.isActive(btn.dataset.cmd)) btn.classList.add('is-active');
|
|
55345
55346
|
else btn.classList.remove('is-active');
|
|
55346
55347
|
});
|
|
55347
55348
|
|
|
55349
|
+
// 2. 정렬 상태 업데이트
|
|
55348
55350
|
this.shadowRoot.querySelectorAll('[data-align]').forEach(btn => {
|
|
55349
55351
|
if (editor.isActive({ textAlign: btn.dataset.align })) btn.classList.add('is-active');
|
|
55350
55352
|
else btn.classList.remove('is-active');
|
|
55351
55353
|
});
|
|
55352
55354
|
|
|
55353
|
-
//
|
|
55354
|
-
const
|
|
55355
|
-
console.log(fontSize);
|
|
55355
|
+
// 3. 폰트 사이즈 업데이트
|
|
55356
|
+
const attrs = editor.getAttributes('textStyle');
|
|
55356
55357
|
const select = this.shadowRoot.querySelector('#font-size');
|
|
55357
|
-
|
|
55358
|
-
|
|
55359
|
-
|
|
55360
|
-
|
|
55361
|
-
|
|
55358
|
+
if (select) {
|
|
55359
|
+
select.value = attrs.fontSize || '14px'; // 값이 없으면 기본값
|
|
55360
|
+
}
|
|
55361
|
+
|
|
55362
|
+
// 4. 글자 색상 업데이트 (추가된 부분)
|
|
55363
|
+
const colorPicker = this.shadowRoot.querySelector('#color-picker');
|
|
55364
|
+
if (colorPicker) {
|
|
55365
|
+
// Tiptap에서 가져온 색상값이 있으면 적용, 없으면 기본 검정색(#000000)
|
|
55366
|
+
colorPicker.value = attrs.color || '#000000';
|
|
55362
55367
|
}
|
|
55363
55368
|
}
|
|
55364
55369
|
|
package/dist/nx/nxEditor.js
CHANGED
|
@@ -156,25 +156,30 @@ class nxEditor extends nxDiv {
|
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
#updateMenuState(editor) {
|
|
159
|
+
// 1. 일반 커맨드 버튼 상태 업데이트
|
|
159
160
|
this.shadowRoot.querySelectorAll('[data-cmd]').forEach(btn => {
|
|
160
161
|
if (editor.isActive(btn.dataset.cmd)) btn.classList.add('is-active');
|
|
161
162
|
else btn.classList.remove('is-active');
|
|
162
163
|
});
|
|
163
164
|
|
|
165
|
+
// 2. 정렬 상태 업데이트
|
|
164
166
|
this.shadowRoot.querySelectorAll('[data-align]').forEach(btn => {
|
|
165
167
|
if (editor.isActive({ textAlign: btn.dataset.align })) btn.classList.add('is-active');
|
|
166
168
|
else btn.classList.remove('is-active');
|
|
167
169
|
});
|
|
168
170
|
|
|
169
|
-
//
|
|
170
|
-
const
|
|
171
|
-
console.log(fontSize);
|
|
171
|
+
// 3. 폰트 사이즈 업데이트
|
|
172
|
+
const attrs = editor.getAttributes('textStyle');
|
|
172
173
|
const select = this.shadowRoot.querySelector('#font-size');
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
174
|
+
if (select) {
|
|
175
|
+
select.value = attrs.fontSize || '14px'; // 값이 없으면 기본값
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// 4. 글자 색상 업데이트 (추가된 부분)
|
|
179
|
+
const colorPicker = this.shadowRoot.querySelector('#color-picker');
|
|
180
|
+
if (colorPicker) {
|
|
181
|
+
// Tiptap에서 가져온 색상값이 있으면 적용, 없으면 기본 검정색(#000000)
|
|
182
|
+
colorPicker.value = attrs.color || '#000000';
|
|
178
183
|
}
|
|
179
184
|
}
|
|
180
185
|
|
package/package.json
CHANGED
package/src/nx/nxEditor.js
CHANGED
|
@@ -156,25 +156,30 @@ class nxEditor extends nxDiv {
|
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
#updateMenuState(editor) {
|
|
159
|
+
// 1. 일반 커맨드 버튼 상태 업데이트
|
|
159
160
|
this.shadowRoot.querySelectorAll('[data-cmd]').forEach(btn => {
|
|
160
161
|
if (editor.isActive(btn.dataset.cmd)) btn.classList.add('is-active');
|
|
161
162
|
else btn.classList.remove('is-active');
|
|
162
163
|
});
|
|
163
164
|
|
|
165
|
+
// 2. 정렬 상태 업데이트
|
|
164
166
|
this.shadowRoot.querySelectorAll('[data-align]').forEach(btn => {
|
|
165
167
|
if (editor.isActive({ textAlign: btn.dataset.align })) btn.classList.add('is-active');
|
|
166
168
|
else btn.classList.remove('is-active');
|
|
167
169
|
});
|
|
168
170
|
|
|
169
|
-
//
|
|
170
|
-
const
|
|
171
|
-
console.log(fontSize);
|
|
171
|
+
// 3. 폰트 사이즈 업데이트
|
|
172
|
+
const attrs = editor.getAttributes('textStyle');
|
|
172
173
|
const select = this.shadowRoot.querySelector('#font-size');
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
174
|
+
if (select) {
|
|
175
|
+
select.value = attrs.fontSize || '14px'; // 값이 없으면 기본값
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// 4. 글자 색상 업데이트 (추가된 부분)
|
|
179
|
+
const colorPicker = this.shadowRoot.querySelector('#color-picker');
|
|
180
|
+
if (colorPicker) {
|
|
181
|
+
// Tiptap에서 가져온 색상값이 있으면 적용, 없으면 기본 검정색(#000000)
|
|
182
|
+
colorPicker.value = attrs.color || '#000000';
|
|
178
183
|
}
|
|
179
184
|
}
|
|
180
185
|
|