Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Why is func textView(_ textView: TextView, deletedAttachment attachment: MediaAttachment) in the TextViewAttachmentDelegate protocol being called when the user taps on the source code button and comes back to the editor view from html ?

Aperta
#1,287 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
swift
Ambito
mobile

Direzione di ricerca

Inizia con il protocollo TextViewAttachmentDelegate e la transizione del pulsante sourcecode descritta nell’issue. Riproduci il passaggio da HTML a UITextView senza modificare l’HTML, quindi traccia quando viene chiamato deletedAttachment. Il lavoro è completato quando viene spiegato il callback oppure viene impedito un callback di eliminazione spurio, preservando i callback per le eliminazioni effettive degli attachments.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hello, thanks for your help. This is a great library. I need to have a model object that represents the pictures in a AztecEditor view. So I need to keep the pictures in the aztecview and the model in sync. There is no problem for the model creation after selecting a picture for insertion, but I need a way to also delete from the model the pictures that get deleted by the user. I came across this in the implementation of the TextViewAttachmentDelegate protocol:

func textView(_ textView: TextView, deletedAttachment attachment: MediaAttachment) {},

that looks exactly what I need. The problem is, I have verified that this delegate method gets called also when switching from html editor to UITextView using the 'sourcecode' button. This breaks my logic. Is there a special reason why the method is called when switching from html to UITextView without even touching the html text before pressing the button ? Many thanks for your help.

Lingua principale
Swift
Stelle
667
Fork
153
Merge medio
2g 6h
PR unite (30g)
4

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di wordpress-mobile/AztecEditor-iOS

Tutte le issue di wordpress-mobile/AztecEditor-iOS

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.