How to edit / delete text in SourceCodeEditor

Hello.

I have a problem, I wanted to test SourceCodeEditor component, and I need to change or delete the text in the element.

I was able to get the content of this element:
valueField.getDelegate().find(By.className("ace_content")).innerHTML()

The result of such a request:

<<span class="ace_punctuation ace_xmldecl ace_xml">&lt;?</span>
<<span class="act_keyword ace_xmldecl ace_xml">xml</span>
<<<<span class="ace_test ace_white space ace_xml"> </span>
< < span class= "base_entity any_other use_attribute-name ace_decl-attribute-name ace_xml" > version</span>
< < span class= "act_keyword ace_operator ace_decl-attribute-equal to ace_xml">=</span>

But edit / delete the text failed. I would like to know if there is a way to edit / delete text from SourceCodeEditor

Thanks.

Hi,

You can’t directly manipulate DOM-tree. If you describe your task in more detail I’ll try to suggest a solution.

Gleb

I just didn’t find any methods in the SourceCodeEditor for deleting, adding, and changing text (for example, how the TextField component has the setValue() method ). Are there any such methods or maybe there are some other ways to interact with the text in this component?