Generative rich text editor
This content field extension replaces the built in rich text editor with a customizable editor that features embeddable content items, enhanced markdown support and a ChatGPT powered AI assistant.
The AI assistant helps improve your content production and editing workflow, and lets you generate and edit content using natural language. If you know the search terms for which you want to optimize your content, you can use them with the AI assistant to generate keyword optimized content. You might want to use it to get some inspiration to start a blog post, for example, or to rewrite text in a different style, or shorten text to match a word count, there are many possible uses.
Note that you can use the Generative rich text editor extension without the AI assistant by updating the extension parameters.
The AI assistant feature of the Generative rich text editor extension is classified as an Amplience labs preview for you to evaluate and provide feedback. It's provided as is and is unsupported. Each time you use the generate text button you'll use one Amplience credit.
Using the Generative rich text editor extensionLink copied!
When you create some content that uses the extension, the "AI Assistant" button is shown in toolbar as highlighted in the image below. When clicking the button, the AI Assistant dialog is shown and from here you can enter a natural language prompt which is sent to ChatGPT.
In this example we're asking the assistant to write a blog post about hats. We can then use this text as a starting point for our own blog.
If the Generative rich text editor is configured to generate keyword optimized content, you will have the option to generate keyword optimized content.
A blog called "The history of hats" is generated and added to the rich text field in the content form. When you select some text you'll notice some shortcuts at the bottom of the text field. You can choose a shortcut to improve, shorten or expand the selected text.
You can also enter your own prompt to rewrite the post in a certain number of characters or a certain style, for example. You can also add your own shortcuts.
If you run out of credits when using the Generative rich text editor or Image alt text generator, you'll still be able to use all the rest of the functionality of the extension and enter text yourself, you just won't be able to use the AI features to generate the text.
Schema examplesLink copied!
To make it easier to use the Generative rich text editor extension in your own schemas we've included some schema examples to help get you started.
There are two schema examples included: one that uses a registered extension and one that includes the extension URL directly in the schema. In most cases you will want to register the extension so that you do not have to specify the installation parameters each time you use it in a schema.
Schema example using a registered extensionLink copied!
In order to use this schema you will need to register the extension using the following details:
- Category: Content field extension
- Name: rich-text-extension (if you use a different name you will need to change the name in the example schema)
- URL:
https://rich-text.extensions.content.amplience.net
- Initial height: 500
PermissionsLink copied!
In the permissions section set the "allowSameOrigin" sandbox permission.
Installation parametersLink copied!
In the installation parameters you can choose to set the language as "markdown" or "json". The example schema is set up to use markdown so include the following in the installation params section:
Example schemaLink copied!
The schema example using the registered extension is shown below.
Schema using the extension URLLink copied!
This schema example shows how to include the extension in the schema using its URL. Note that if you are using your own OpenAPI account you will need to include your OpenAI API key in the tools section:
You can also find more details about configuring the extension on GitHub.
Generating keyword optimized contentLink copied!
To generate keyword optimized content, the Generative rich text editor extension must be configured to use a keyword source. Set the keyword source as a parameter, either when registering the extension or within your content type schema.
To tell the AI Assistant where to get the keywords from, the 'keywordSource' parameter must point to a keyword property defined in the schema. An example keyword property is shown below, and is included in the Dynamic Content schema example:
If you're using the SEO Assistant extension, you can use a keyword property from that as the source for generating keyword optimized content. See the SEO Assistant schema examples.
Once the extension is configured you’ll have the ability to enter your SEO keywords. The AI Assistant will then generate content optimized with your set keywords. In the example below, keywords are entered and will be used for generating optimized content.
The AI Assistant only displays the option to use keywords if you have entered keywords in the keyword source field.
Using your own OpenAI accountLink copied!
You can use your own OpenAI account rather than Amplience credits. You'll need to create an API key and add it to installation parameters for the extension. See Generative rich text extension configuration on the GitHub repo for more details.
ChatGPT is not affiliated with Amplience and therefore any impact to ChatGPT services such as updates, busy periods, or outages are outside of Amplience control. By using this feature, you are solely responsible for ensuring that AI generated content complies with internal company policies, applicable laws and OpenAI's Terms.
TroubleshootingLink copied!
The AI assistant dialog is not opened when you click the icon
Check that your OpenAI API Key has been added to the extensions's installation parameters for a registered extension, or in the parameters section of the property of the schema that uses the extension. See the Generative rich text extension configuration for full details.
Verify that your OpenAI key has sufficient credit. You may need to open a paid OpenAI account to ensure that you have sufficient credits to continue to make requests.
Launching Content Studio from the content formLink copied!
You can now launch Content Studio from the Generative rich text editor by clicking the "Content Studio" icon as shown below.
If your organization does not have access to Content Studio then a dialog will be displayed explaining how to get it added to your account.
When you launch Content Studio from the content form, a "Save" button is shown when content is generated. In this example, content has been generated using one of the Content Studio templates.
Clicking "Save" in Content Studio will save the generated content back to the content form.
You can choose to hide the Content Studio icon by setting the extension's installation parameters.
Turning off the AI assistantLink copied!
If you want to use the Generative rich text editor extension without the AI assistant features, add the following to the extension's installation parameters:
The rich text editor will be displayed, but the AI assistant button will not be shown.
Turning off the Content Studio iconLink copied!
If you wish to disable the ability to launch Content Studio from the Generative rich text editor, add the following to the extension's installation parameters: