Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

218
Views
TinyMCE - estilo: inserte el complemento de fecha y hora - fuente / tamaño

¿Alguien puede decirme cómo, o si, puedo diseñar el texto insertado por el complemento TinyMCE insertdatetime?

Específicamente, me gustaría establecer el tamaño de fuente en un tamaño más pequeño que el resto del texto.

También me pregunto si hacerlo podría causar un problema para el texto escrito posteriormente, ya que continuaría con el tamaño de fuente diferente.

Esto es lo que estoy usando ahora:

 insertdatetime_formats: [ '✏️ (%d/%m/%Y - %Hh%M)', '%d/%m/%Y' ],

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Una forma de hacer esto es envolver la cadena de fecha/hora en un elemento <time> usando insertdatetime_element: true , luego estilice esa etiqueta <time> con content_style . Como dijiste, esto crea un problema en el que el texto permanecerá más pequeño si continúas escribiendo (hasta que presiones la tecla Intro).

Como solución alternativa, puede usar noneditable_noneditable_class y extended_valid_elements para agregar la clase no editable a la etiqueta <time> (si no necesita ser editable) y cualquier texto escrito después volverá al estilo predeterminado.

Violín de ejemplo: https://fiddle.tiny.cloud/LShaab/3

 tinymce.init({ selector: "textarea", plugins: [ "insertdatetime noneditable" ], insertdatetime_formats: ['(%d/%m/%Y - %Hh%M)', '%d/%m/%Y'], insertdatetime_element: true, content_style: "time { font-size:11px; }", noneditable_noneditable_class: 'mceNonEditable', extended_valid_elements: 'time[class=mceNonEditable]' });
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!