I finally found out how it works. Here are my solutions, if somebody is interested: ------------------- Copy: kapp->clipboard()->setText(view->selectionText()); Paste: view->insertText(kapp->clipboard()->text()); Cut: kapp->clipboard()->setText(view->selectionText()); view->removeSelectionText(); Undo: QMetaObject::invokeMethod(view->document(),"undo"); Redo: QMetaObject::invokeMethod(view->document(),"redo"); ------------------- And there seems to be a bug with the redo()-Function of KateDocument. If i type in some lines, undo them , and then redo, the cursor gets to an invalid position, because he is moved to the end of the text, that should normaly be there. The text gets there with the next redo. If you move the cursor, while he is at the invalid position, the app crahses. _______________________________________________ KTextEditor-Devel mailing list KTextEditor-Devel@kde.org https://mail.kde.org/mailman/listinfo/ktexteditor-devel