Is there any way to specify a title attribute for each of the options for an Editor checkbox?

Is there any way to specify a title attribute for each of the options for an Editor checkbox?

loukinglouking Posts: 259Questions: 52Answers: 0

I want the tooltip / title to be specified for each of my options for a checkbox used with the Editor. Is this possible?

I don't see any way to specify the title attr mentioned in https://editor.datatables.net/reference/field/checkbox under options.

This question has an accepted answers - jump to answer

Answers

  • loukinglouking Posts: 259Questions: 52Answers: 0
    edited February 2021

    Actually I should have tested this before asking the question. I added 'attr' property with {'title': 'popup text'} and it works. This shows the tooltip over the checkbox itself. Is there a way to show it over the label instead, or in addition to the checkbox?

    Should this be documented? Maybe I missed it...

  • allanallan Posts: 61,722Questions: 1Answers: 10,108 Site admin
    Answer ✓

    It looks like I did miss that attr can be used for the checkbox input elements - apologies for that.

    The only way to modify the label tags would be to loop over them and add them "manually": var labels = $('label', editor.field('myField').node());.

    Allan

This discussion has been closed.