ninegrid2 6.1330.0 → 6.1333.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 +24 -1
- package/dist/bundle.esm.js +24 -1
- package/dist/nx/nxEditor.js +24 -1
- package/package.json +1 -1
- package/src/nx/nxEditor.js +24 -1
package/dist/bundle.cjs.js
CHANGED
|
@@ -55310,7 +55310,21 @@ class nxEditor extends nxDiv {
|
|
|
55310
55310
|
extensions: [
|
|
55311
55311
|
index_default,
|
|
55312
55312
|
Underline,
|
|
55313
|
-
TextStyle
|
|
55313
|
+
TextStyle.extend({
|
|
55314
|
+
addAttributes() {
|
|
55315
|
+
return {
|
|
55316
|
+
fontSize: {
|
|
55317
|
+
default: null,
|
|
55318
|
+
// HTML 태그에 style="font-size: ..."를 입히는 로직
|
|
55319
|
+
parseHTML: element => element.style.fontSize,
|
|
55320
|
+
renderHTML: attributes => {
|
|
55321
|
+
if (!attributes.fontSize) return {};
|
|
55322
|
+
return { style: `font-size: ${attributes.fontSize}` };
|
|
55323
|
+
},
|
|
55324
|
+
},
|
|
55325
|
+
};
|
|
55326
|
+
},
|
|
55327
|
+
}),
|
|
55314
55328
|
Color,
|
|
55315
55329
|
TextStyle.configure({ types: [Highlight.name, Color.name] }),
|
|
55316
55330
|
Highlight.configure({ multicolor: true }),
|
|
@@ -55339,6 +55353,15 @@ class nxEditor extends nxDiv {
|
|
|
55339
55353
|
if (editor.isActive({ textAlign: btn.dataset.align })) btn.classList.add('is-active');
|
|
55340
55354
|
else btn.classList.remove('is-active');
|
|
55341
55355
|
});
|
|
55356
|
+
|
|
55357
|
+
// 현재 선택 영역의 폰트 사이즈를 가져와 셀렉트 박스에 반영
|
|
55358
|
+
const fontSize = editor.getAttributes('textStyle').fontSize;
|
|
55359
|
+
const select = this.shadowRoot.querySelector('#font-size');
|
|
55360
|
+
if (fontSize) {
|
|
55361
|
+
select.value = fontSize;
|
|
55362
|
+
} else {
|
|
55363
|
+
select.value = '14px'; // 기본값
|
|
55364
|
+
}
|
|
55342
55365
|
}
|
|
55343
55366
|
|
|
55344
55367
|
#bindEvents() {
|
package/dist/bundle.esm.js
CHANGED
|
@@ -55306,7 +55306,21 @@ class nxEditor extends nxDiv {
|
|
|
55306
55306
|
extensions: [
|
|
55307
55307
|
index_default,
|
|
55308
55308
|
Underline,
|
|
55309
|
-
TextStyle
|
|
55309
|
+
TextStyle.extend({
|
|
55310
|
+
addAttributes() {
|
|
55311
|
+
return {
|
|
55312
|
+
fontSize: {
|
|
55313
|
+
default: null,
|
|
55314
|
+
// HTML 태그에 style="font-size: ..."를 입히는 로직
|
|
55315
|
+
parseHTML: element => element.style.fontSize,
|
|
55316
|
+
renderHTML: attributes => {
|
|
55317
|
+
if (!attributes.fontSize) return {};
|
|
55318
|
+
return { style: `font-size: ${attributes.fontSize}` };
|
|
55319
|
+
},
|
|
55320
|
+
},
|
|
55321
|
+
};
|
|
55322
|
+
},
|
|
55323
|
+
}),
|
|
55310
55324
|
Color,
|
|
55311
55325
|
TextStyle.configure({ types: [Highlight.name, Color.name] }),
|
|
55312
55326
|
Highlight.configure({ multicolor: true }),
|
|
@@ -55335,6 +55349,15 @@ class nxEditor extends nxDiv {
|
|
|
55335
55349
|
if (editor.isActive({ textAlign: btn.dataset.align })) btn.classList.add('is-active');
|
|
55336
55350
|
else btn.classList.remove('is-active');
|
|
55337
55351
|
});
|
|
55352
|
+
|
|
55353
|
+
// 현재 선택 영역의 폰트 사이즈를 가져와 셀렉트 박스에 반영
|
|
55354
|
+
const fontSize = editor.getAttributes('textStyle').fontSize;
|
|
55355
|
+
const select = this.shadowRoot.querySelector('#font-size');
|
|
55356
|
+
if (fontSize) {
|
|
55357
|
+
select.value = fontSize;
|
|
55358
|
+
} else {
|
|
55359
|
+
select.value = '14px'; // 기본값
|
|
55360
|
+
}
|
|
55338
55361
|
}
|
|
55339
55362
|
|
|
55340
55363
|
#bindEvents() {
|
package/dist/nx/nxEditor.js
CHANGED
|
@@ -122,7 +122,21 @@ class nxEditor extends nxDiv {
|
|
|
122
122
|
extensions: [
|
|
123
123
|
StarterKit,
|
|
124
124
|
Underline,
|
|
125
|
-
TextStyle
|
|
125
|
+
TextStyle.extend({
|
|
126
|
+
addAttributes() {
|
|
127
|
+
return {
|
|
128
|
+
fontSize: {
|
|
129
|
+
default: null,
|
|
130
|
+
// HTML 태그에 style="font-size: ..."를 입히는 로직
|
|
131
|
+
parseHTML: element => element.style.fontSize,
|
|
132
|
+
renderHTML: attributes => {
|
|
133
|
+
if (!attributes.fontSize) return {};
|
|
134
|
+
return { style: `font-size: ${attributes.fontSize}` };
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
},
|
|
139
|
+
}),
|
|
126
140
|
Color,
|
|
127
141
|
TextStyle.configure({ types: [Highlight.name, Color.name] }),
|
|
128
142
|
Highlight.configure({ multicolor: true }),
|
|
@@ -151,6 +165,15 @@ class nxEditor extends nxDiv {
|
|
|
151
165
|
if (editor.isActive({ textAlign: btn.dataset.align })) btn.classList.add('is-active');
|
|
152
166
|
else btn.classList.remove('is-active');
|
|
153
167
|
});
|
|
168
|
+
|
|
169
|
+
// 현재 선택 영역의 폰트 사이즈를 가져와 셀렉트 박스에 반영
|
|
170
|
+
const fontSize = editor.getAttributes('textStyle').fontSize;
|
|
171
|
+
const select = this.shadowRoot.querySelector('#font-size');
|
|
172
|
+
if (fontSize) {
|
|
173
|
+
select.value = fontSize;
|
|
174
|
+
} else {
|
|
175
|
+
select.value = '14px'; // 기본값
|
|
176
|
+
}
|
|
154
177
|
}
|
|
155
178
|
|
|
156
179
|
#bindEvents() {
|
package/package.json
CHANGED
package/src/nx/nxEditor.js
CHANGED
|
@@ -122,7 +122,21 @@ class nxEditor extends nxDiv {
|
|
|
122
122
|
extensions: [
|
|
123
123
|
StarterKit,
|
|
124
124
|
Underline,
|
|
125
|
-
TextStyle
|
|
125
|
+
TextStyle.extend({
|
|
126
|
+
addAttributes() {
|
|
127
|
+
return {
|
|
128
|
+
fontSize: {
|
|
129
|
+
default: null,
|
|
130
|
+
// HTML 태그에 style="font-size: ..."를 입히는 로직
|
|
131
|
+
parseHTML: element => element.style.fontSize,
|
|
132
|
+
renderHTML: attributes => {
|
|
133
|
+
if (!attributes.fontSize) return {};
|
|
134
|
+
return { style: `font-size: ${attributes.fontSize}` };
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
},
|
|
139
|
+
}),
|
|
126
140
|
Color,
|
|
127
141
|
TextStyle.configure({ types: [Highlight.name, Color.name] }),
|
|
128
142
|
Highlight.configure({ multicolor: true }),
|
|
@@ -151,6 +165,15 @@ class nxEditor extends nxDiv {
|
|
|
151
165
|
if (editor.isActive({ textAlign: btn.dataset.align })) btn.classList.add('is-active');
|
|
152
166
|
else btn.classList.remove('is-active');
|
|
153
167
|
});
|
|
168
|
+
|
|
169
|
+
// 현재 선택 영역의 폰트 사이즈를 가져와 셀렉트 박스에 반영
|
|
170
|
+
const fontSize = editor.getAttributes('textStyle').fontSize;
|
|
171
|
+
const select = this.shadowRoot.querySelector('#font-size');
|
|
172
|
+
if (fontSize) {
|
|
173
|
+
select.value = fontSize;
|
|
174
|
+
} else {
|
|
175
|
+
select.value = '14px'; // 기본값
|
|
176
|
+
}
|
|
154
177
|
}
|
|
155
178
|
|
|
156
179
|
#bindEvents() {
|