0

I am building an extention for chrome which working with skype chat(web.skype.com). I have almost done it but I cant implement send method. Placeholder is a div which listens keyboard events(as I think) and creates span inside tag. Button send is a button tag so it can be triggered.

<div aria-describedby="placeholder-daj2" aria-label="Введите сообщение" aria-multiline="true" autocapitalize="sentences" autocomplete="on" autocorrect="on" class="notranslate public-DraftEditor-content" role="textbox" spellcheck="true" style="outline: currentcolor none medium; user-select: text; white-space: pre-wrap; overflow-wrap: break-word;" contenteditable="true">
 <div data-contents="true">
  <div class="" data-block="true" data-editor="daj2" data-offset-key="0-0-0">
   <div data-offset-key="0-0-0" class="public-DraftStyleDefault-block public-DraftStyleDefault-ltr">
    <span data-offset-key="0-0-0">
     <span data-text="true">some text</span>
    </span>
   </div>
  </div>
 </div>
</div>

I tried to change <span data-offset-key="0-0-0"> body but it doesnt work, cause events didnt happen.

If you want help you can run your code via console or content script.

    send(text){
        //implement text input
        $('[aria-label="Отправить сообщение"]').trigger('click');
    }
veb1
  • 1
  • Try [this](https://stackoverflow.com/a/57900849). – wOxxOm Nov 20 '21 at 11:01
  • It worked for me: https://stackoverflow.com/questions/54256517/make-document-execcommandinserttext-false-message-work-with-draftjs – veb1 Nov 21 '21 at 11:40

0 Answers0