@@ -228,7 +228,7 @@ func (m *editorCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
228228 case tea.PasteMsg:
229229 path := strings.ReplaceAll(string(msg), "\\ ", " ")
230230 // try to get an image
231− path, err := filepath.Abs(path)
231+ path, err := filepath.Abs(strings.TrimSpace(path))
232232 if err != nil {
233233 m.textarea, cmd = m.textarea.Update(msg)
234234 return m, cmd