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

107
Views
Envolviendo Quill Link con un elemento principal

Necesito personalizar la etiqueta del enlace para envolverla con un div de estilo de la siguiente manera:

 <div class="custom-link"> <a href="https://www.testurl.com">Test URL</a> </div>

Inicialmente traté de extender la clase Link de Quill y crear un elemento principal que lo envuelva:

 class CustomLink extends Link { static create(value) { const node = super.create(value); // Remove unnecessary attributes node.removeAttribute('rel'); node.removeAttribute('target'); // Create a wrapper node that will contain the link const wrapper = document.createElement('div'); wrapper.setAttribute('class', 'custom-link'); wrapper.appendChild(node); return wrapper; } static formats(domNode) { return super.formats(domNode.firstChild); } }

Pero todavía no puedo hacer que funcione como una clase de Link regular. ¿Hay algo que me estoy perdiendo? ¿Necesito crear un Blot personalizado para lograr esto?

about 4 years ago · Juan Pablo Isaza
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!