Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

504
Vistas
Tinymce how to make the alternative description field for images required?

I am using tiny MCE version 5.8.2, sometimes the writers don't add the alternative description when they upload an image. So I would like to make the field required, so that to add the picture the alt must be filled.

I tried the a11y_advanced_options, but it's not what I want, this check are done after the image is added, I want that the form is not submitable until the field is not filled.

enter image description here

I'm thinking about writing a plugin to do it, but I don't know if it's the right solution.

How would you do it ?

about 4 years ago · Santiago Gelvez
2 Respuestas
Responde la pregunta

0

A solution that might be effective, and make use of TinyMCE's existing APIs so you don't need to write anything custom, could be:

  1. Use the A11ychecker toggleaudit() method
  2. Pair this with a specific TinyMCE event, such as NodeChange, BeforeGetContent, and Change or similar event, like the click on the Save button.

The save button in the image dialog has a class of 'tox-button' and responds to the click event, so there may be a way to run the toggleaudit() method when these events happen. However, writing a short script to test this is reaching my knowledge limits.

It's a good question though, and quite possibly something that should be added as a design feature.

about 4 years ago · Santiago Gelvez Denunciar

0

You don't describe how a user upload an image

If you use a filemanager get the filename and post with window.parent.postMessage

The in the file_picker_callback function add

// Provide image and alt text for the image dialog
if (meta.filetype == 'image') {
  callback(details.content, {alt: details.info.substr(0, details.info.lastIndexOf('.'))});
}
about 4 years ago · Santiago Gelvez Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda