I can't get TextEditor to work

Tags: #<Tag:0x00007efc6a32d990> #<Tag:0x00007efc6a32d850>

Screenshot%202023-01-02%20225259 Screenshot%202023-01-02%20225320

i follow this tutorial but instead of using AngularTS i just use JS for my project.
but it seems something is missing, I tried to search these problems on google but there is no suitable answer

Hi @vodoiovcbn9x

Here we have a custom editor written in Vanilla JS: https://jsfiddle.net/9zftrxkv/ It’s based on a SelectEditor, but maybe it would be helpful also in your case just to see general principles. If not, please prepare a code demo so we will be able to debug it.

1 Like

i got it, thank you! I want to ask is there a way to customize a hook?

Hi @vodoiovcbn9x

I’m glad that helped. Hooks can’t be customized beside modifying the source code but we don’t recommend it. What would you like to achieve by customizing the hook (and which one)?

My main problem is that when I click on a cell, it won’t select that cell (readOnly can’t be used), because I want when my Editor is on in a cell, I can click outside without losing it. Editor status

Hi @vodoiovcbn9x

It can be done with a custom editor, that you are building, you would need to use the allowInvalid option cause it prevent from closing the cell editor base on a particular condition. Unfortunately, we don’t have any examples of such editor.

1 Like

it’s perfect!!
But I want to edit, update an option in a certain setting, for example, I set the options as :

  • allowInvalid: false,
  • source: colors,
  • type: ‘autocomplete’,
  • strict: true,
    after i press Enter, set immediately, strict: false for example