Textbox.io for IBM WCM : 3. Configuring services

Please contact IBM if you require support.

The services need additional information to run correctly, including:

  • Which services should run
  • The URLs that they will be accessed from
  • Proxy settings to get around firewalls
  • API keys for external services
  • Configuration of service behavior

Note: Allowed Origins Service

In previous versions of the Textbox.io services, you could use the ephox.allowed.origins.url setting to point to the Allowed Origins Service. This service has been discontinued. Allowed Origins are now configured in the configuration file as below.

If you edit these settings after the "EphoxTbioServices" have been installed you must stop and restart the service for changes to take effect.

You can specify configuration for the Textbox.io server-side features using one of two options.

File based configuration

You can create an application.conf file and specify the settings as documented in the Configuring Textbox.io Services article with the following variations for Connections and WebSphere:

1. Create application.conf

On the drive/partition where WebSphere Application Server (WAS) is installed, create the text file

Operating SystemPathNotes
Linux/Unix/opt/ephox/application.conf 
WindowsDRIVE:\opt\ephox\application.confDRIVE is the drive where Websphere Application Server is installed, e.g. "C", "D" or "E" etc

2. Edit application.conf

Edit this file as shown in section "Create a configuration file" on the installing the server-side components page and the configure the enhanced media embed service page in the Textbox.io documentation. The link-checking and enhanced media embed features are disabled by default in WCM. Enable them explicitly in the application.conf file if required. The Installation and Setup page details how to enable link checking and the Configure Enhanced Media Embed Server page details how to enable Enhanced Media Embed.

In the example below we have chosen to enable the link checking and enhanced media embed. The embed service relies on oEmbed endpoints and we have choosen to only include the free Youtube oEmbed endpoint as an example but normally you would list many more or use an Iframely account for the best experience.

Example application.conf
ephox {
  allowed-origins {
    origins = [
      "http://connections:9081",
      "https://connections:9444",

      "http://connections",
      "https://connections"
    ]
  }
  proxy {
    http.proxyHost = someproxy.internal.corp
    http.proxyPort = 8080
  }
  link-checking {
    enabled = true
  }
  embed {
    enabled = true
    custom = [
      # youtube
      {
        endpoint = "http://www.youtube.com/oembed"
        schemes = [
          "http://youtu.be/*",
          "https://youtu.be/*",
          "http://www.youtu.be/*",
          "https://www.youtu.be/*",
          "http://youtube.com/*",
          "https://youtube.com/*",
          "http://www.youtube.com/*",
          "https://www.youtube.com/*",
          "http://m.youtube.com/*",
          "https://m.youtube.com/*"
        ]
      }
	  # Note: many other endpoints omitted here for brevity 
    ]
  }
}

If you have an API key for IBM Tone Analyzer you can specify the key as follows:

Example application.conf with tone service configuration only
ephox {
  # Tone service configuration
  cognitive {
    tone-analyzer {
      user-name = "<user_name>"
      password = "<password>"
    }
  }
  # Note: other configurations (as in the example above) omitted here for brevity
}

Substitute <user_name> with the actual user name. Substitute <password> with the actual password.

JVM System properties based configuration

If the file-based mechanism is not appropriate, you can set JVM system settings for the configuration of the services.

Note that while it is possible to configure everything using system properties it is not recommended if you wish to use the Enhanced Media Embed service with free oEmbed endpoints as there are many configuration values required for a good experience.

The following steps describe the process for setting the configuration using JVM system properties.

1. Find JVM settings

Find your JVM settings according to the version of Websphere that you are running. Use this page to do so: http://www-01.ibm.com/support/docview.wss?uid=swg21417365 

2. Specify system properties

Specify the domains where the editor is served from, and optionally other settings such as link caching and proxy configuration. For details, please review Server-Side Components - Installation and Setup for Textbox.io.

Example JVM system properties
-Dephox.allowed-origins.origins.0=http://connections 
-Dhttp.proxyHost=someproxy.internal.corp 
-Dhttp.proxyPort=8080

When specifying the URL/s for the domains that will serve the Textbox.io editor, you may need to specify different combinations of the protocol, hostname and port based on the browsers you use. For more details, please review Server-Side Components - Installation and Setup for Textbox.io.
If you need additional domains where the editor is served from, you need to specify additional allowed origins by repeating -Dephox.allowed-origins.origins.0=domain, replacing the “0” with an incrementing number for each domain that is added.

Example JVM system properties
-Dephox.allowed-origins.origins.1=http://connections.yourdomain
-Dephox.allowed-origins.origins.2=http://connections:10039
-Dephox.allowed-origins.origins.3=http://connections.yourdomain:10039

If you have an API key for IBM Tone Analyzer you can specify the key as follows:

Example JVM system properties for Tone Service
-Dephox.cognitive.tone-analyzer.user-name=<user_name>
-Dephox.cognitive.tone-analyzer.password=<password>

Substitute <user_name> with the actual user name without any quotes. Substitute <password> with the actual password without any quotes.

Attachments: