Open iwasherefirst2 opened 2 years ago
I found out that I can use the paste
options to prevent HTML tags, but I still get <br>
with line breaks. I tried these settings:
paste: {
forcePlainText: true,
cleanPastedHTML: true,
cleanReplacements: [
[new RegExp(/<br>/gi), "\n"],
]
},
This is almost what I am looking for, but "
" seems not to be replaced by a newline, but instead by just nothing?
yeah same behavior here https://github.com/yabwe/medium-editor/issues/1600
anyway this project is dead and full of bug, i will begin to search for another library for editing HTML
Description
I am using medium-editor for my developing blog. I want to add code by copy-paste and then use prism.js to display it. Currently when I copy & paste code, each line is a new paragraph. This does not work with prism.js. I would need real linebreaks.
How can I change that if I copy multiple lines that they are not in multiple paragraphs, but just separated by \n? Is this configurable?
Steps to reproduce
Expected behavior: Lines should be seperated by new line
Actual behavior: Lines are seperated by paragraph
Versions