Is there a way to prevent comment edition?

Hi Team,

I have an issue with comment box. Indeed, in certain condition I only show a readable table. Without any edition possible. However I still can edit the comment in the comment box.

Is there a setting I can use to desactivate this?

Thanks in advance for your help.

Thomas

Hi @luexternaltweyrich

Sorry for keeping you waiting.
The readOnly comments are unavailable yet.

Hi @aleksandra_budnik
I see the status of the issue is approved since 2015.
Any idea if there will be a solution?

Thanks in advance,
Regards,
Thomas

Yes. It’s really hard to admit but new features aren’t coming up as often as bug fixes.
I believe that this change could be possible by accessing the commentEditor (via comments plugin) but after testing some approaches the API doesn’t allow us to do more with the editor that just check its settings.

@luexternaltweyrich
Since read-only comments have not been forthcoming, are you aware that as per my post Block entire Handsontable going hot.updateSettings({ comments: false }); at least switches off comments so they cannot be edited.

It removes comments completely completely, so unfortunately the user cannot see them, but if it’s important that the user must not edit comments in a read-only table it may be preferable to allowing editing.

You may also want some of the other settings there for your read-only Hot, depending on what you have already discovered for yourself.

Hi @jon

Thanks for your feedback. However I need to keep the comment visible since users should read them…
So we kept it editable for the moment.

You can try with CSS instead, giving a pointer-events: none to the comments container

1 Like

@thiagarajan, I’m actually a SAP Developer so CSS is still chineese to me :smiley:

1 Like

@thiagarajan I will check with colleagues about you proposal. I will let you know

1 Like

Hi @luexternaltweyrich

@thiagarajan 's suggestion actually sounds like quite a neat & possible workaround. Try to find some Chinese-speaking CSS colleagues to help you out :slight_smile:

1 Like