|
@@ -53,9 +53,10 @@ export default {
|
|
|
line = line.replace(/\r/, '');
|
|
|
line = line.replace(/(\s{2})/, (all, $1) => {
|
|
|
if ($1.charAt(0) == '\n' || $1.charAt(0) == '\r' || $1.charAt(0) == '\x20') return all;
|
|
|
- return all.replace($1, Array($1.length).fill(' ').join(''));
|
|
|
+ return all.replace($1, Array($1.length).fill('').join(''));
|
|
|
});
|
|
|
- nodeList.push({ type: 'paragraph', children: [{ text: line }] });
|
|
|
+ // nodeList.push({ type: 'paragraph', children: [{ text: line }] });
|
|
|
+ nodeList.push({ type: 'paragraph', indent: '2em', children: [{ text: line }] });
|
|
|
}).join('\n');
|
|
|
SlateTransforms.insertNodes(editor, nodeList);
|
|
|
event.preventDefault();
|