Prerequisites

There are two ways to evaluate the TX Text Control Document Editor. You can either host your own backend by downloading the trial version of TX Text Control .NET Server for ASP.NET, or by creating a trial access token to use a hosted backend, valid for 30 days:

Creating the React Application

This tutorial shows how to create your first Angular application using the TX Text Control Document Editor.

Prerequisites

  1. Create your free trial access token here:

    Create Access Token

  2. Install Node.js® and npm, if not done before.

  3. Open a Command Prompt and install the create-react-app globally by typing in the following command:

    npm install -g create-react-app

Setting up the Application

  1. Open a Command Prompt and create a new React application by typing in the following command:

    npx create-react-app my-tx-document-editor-app
  2. Change into the newly created directory:

    cd my-tx-document-editor-app
  3. Install the TX Text Control package:

    npm install --save @txtextcontrol/tx-react-document-editor
  4. Open this folder in Visual Studio Code using this command:

    code .
  5. Open the src/App.js file and replace the content with the following code:

    import DocumentEditor from '@txtextcontrol/tx-react-document-editor';
    import './App.css';
    function App() {
    return (
    <DocumentEditor
    webSocketURL="wss://backend.textcontrol.com/api/TXWebSocket?access-token=your_trial_token"
    editMode="Edit">
    </DocumentEditor>
    );
    }
    export default App;
    view raw test.js hosted with ❤ by GitHub

    Replace your_trial_token with your actual access token you created at the beginning of this tutorial.

Running the Application

  1. Start the application by typing in the following command:

    npm start