How to Get Text from .TXT file into RichTextBox?

I have .txt files stored externally. I want the users of my website to be able to read and edit them. I can display them in an HTML element but I am not sure how to output the text in the files into a richTextBox so the users can edit them. Does anyone know how this can be done?

The files are retrieved using source URLs to their external location.

In the htmlComponent:

How to send msg from iframe to parent page

https://www.wix.com/corvid/reference/$w/htmlcomponent/onmessage

Then assign the text to a rich text element:
https://www.wix.com/corvid/reference/$w/richtextbox/value

Works perfectly; thank you.

You’re welcome :slight_smile:

@anralore as a matter of fact, you don’t need an iframe at all.
You can just:

import {fetch} from 'wix-fetch';
fetch('https://www.w3.org/TR/PNG/iso_8859-1.txt')
  .then(response => response.text())
  .then(data => {
  //push the data to the text box
  });