Paste as a plain text
@kolkov how can I paste as a plain text in the angular editor can you please guide me
Can anyone reply for the above
You'll get no answer to your question because there's no place where you can ask such a question than here, and NO CONTRIBUTOR is going to waste his time answering you.
You've got two ways:
-
Fork from current (or any older branch) from this repository, modify src code once in your file system, try to build and replace all references in your app to your modified library. That means you'll have to deal with a lot of other issues and still no answer anywhere you ask.
-
Try to catch the paste event outside this object but in your project. There are many ways to try. Maybe it works adding an event handler in your html template:
<angular-editor (focus)="focus($event)"></angular-editor>
and then adding an event listener in your ts component file:
focus($event) {
event.addEventListener("paste", ($event: any) => {
$event.preventDefault();
const text = $event.clipboardData.getData("text/plain");
window.document.execCommand("insertText", false, text);
});
Anyway you're going to scratch your head until you get bald. And be grateful to the universe as I have read your question today, because else way you'll have no answer. Ever.