Чтобы добавить текст в Canvas
text_id = text_editor.create_text(0, 0, text=written_text, anchor='nw')
# from tkinter import * # PEP8: `import *` is not preferred
import tkinter as tk
# --- functions ---
def replace_TextWidget_with_CanvasWidget():
global text_editor
global written_text
written_text = text_editor.get('1.0', 'end')
text_editor.destroy()
text_editor = tk.Canvas(root, height=851, width=601, bg='white')
text_editor.pack()
text_id = text_editor.create_text(0, 0, text=written_text, anchor='nw')
#text_editor.insert(text_id, 'end', written_text)
# --- main ---
root = tk.Tk()
root.config(bg='black')
button = tk.Button(root, text="OK", command=replace_TextWidget_with_CanvasWidget)
button.pack()
text_editor = tk.Text(root, height=50, width=75)
text_editor.pack()
text_editor.insert('1.0', 'HERE I WRITE SOMETHING I WANT TO BE COPIED ON THE CANVAS LATER')
root.mainloop()