B
B
balex7772021-12-09 16:00:42
JavaScript
balex777, 2021-12-09 16:00:42

How to make Draft JS Editor textarea clickable?

There is a block containing Editor Draft js

<div
      className={classnames('text-editor', className)}
    >
      <Editor
        spellCheck
        handleKeyCommand={handleKeyCommand}
        blockRenderMap={BLOCK_RENDER_MAP}
        editorState={state}
        keyBindingFn={handlerKeyBinding}
        onChange={onChange}
      />
    </div>


Let's say the whole div is 400px high and in the Editor you can only click on the first line so that it becomes active, if you click in other areas, of course nothing happens.
Yes, there is an option to hang OnClick on a DIV, but ElSint says that this is not good, you need to assign a role to the div, etc.)
How to do it right?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question