@internetstiftelsen/styleguide 2.21.16 → 2.21.17
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.
|
@@ -137,7 +137,7 @@ function createToolbar(el, editor) {
|
|
|
137
137
|
function getHTML(editor) {
|
|
138
138
|
var html = editor.getHTML();
|
|
139
139
|
|
|
140
|
-
return html;
|
|
140
|
+
return html.replace(/<li><p>/g, '<li>').replace(/<\/p><\/li>/g, '</li>');
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
function setupTextArea(el) {
|
|
@@ -158,7 +158,7 @@ function setupTextArea(el) {
|
|
|
158
158
|
},
|
|
159
159
|
onUpdate: function onUpdate(props) {
|
|
160
160
|
var html = getHTML(props.editor);
|
|
161
|
-
|
|
161
|
+
|
|
162
162
|
el.value = html;
|
|
163
163
|
onChange(html);
|
|
164
164
|
}
|
package/package.json
CHANGED
|
@@ -131,7 +131,9 @@ function createToolbar(el, editor) {
|
|
|
131
131
|
function getHTML(editor) {
|
|
132
132
|
const html = editor.getHTML();
|
|
133
133
|
|
|
134
|
-
return html
|
|
134
|
+
return html
|
|
135
|
+
.replace(/<li><p>/g, '<li>')
|
|
136
|
+
.replace(/<\/p><\/li>/g, '</li>');
|
|
135
137
|
}
|
|
136
138
|
|
|
137
139
|
export function setupTextArea(el, onChange = () => {}) {
|
|
@@ -153,7 +155,7 @@ export function setupTextArea(el, onChange = () => {}) {
|
|
|
153
155
|
},
|
|
154
156
|
onUpdate(props) {
|
|
155
157
|
const html = getHTML(props.editor);
|
|
156
|
-
|
|
158
|
+
|
|
157
159
|
el.value = html;
|
|
158
160
|
onChange(html);
|
|
159
161
|
},
|
package/src/.DS_Store
DELETED
|
Binary file
|
package/src/atoms/.DS_Store
DELETED
|
Binary file
|
package/src/atoms/icon/.DS_Store
DELETED
|
Binary file
|
package/src/molecules/.DS_Store
DELETED
|
Binary file
|