Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de 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 ?

Abierto
#1,287 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
swift
Área
mobile

Línea de trabajo

Comienza con el protocolo TextViewAttachmentDelegate y la transición del botón sourcecode descrita en el issue. Reproduce el cambio de HTML a UITextView sin editar el HTML y, después, rastrea cuándo se llama a deletedAttachment. Se considera terminado cuando se explica el callback o se evita un callback de eliminación espurio, preservando los callbacks para las eliminaciones reales de attachments.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Swift
Estrellas
667
Forks
153
Merge medio
2 d 6 h
PR fusionados (30 d)
4

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de wordpress-mobile/AztecEditor-iOS

Todos los issues de wordpress-mobile/AztecEditor-iOS

Issues similares

Más issues de Swift

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.