Skip to main content

Text editor placement

The Text editor placement makes AI actions available directly inside the TinyMCE text editor.

When properly configured, it allows users to generate content with AI while editing text in supported areas of Moodle.

Prerequisites

This placement works only when Moodle is configured to use the TinyMCE editor.

If your site is not using TinyMCE, the AI button will not appear.

To check or change the active editor, refer to Moodle’s official documentation: https://docs.moodle.org/405/en/Editing_text

Enable the placement

  1. Go to Site administration > General > AI > AI placements.

  2. In the AI placements table, activate the toggle in the Text editor placement row.

    Enable Text Editor Placement

  3. Once enabled, click Settings to configure it.

    Text Editor Placement Settings

Enable actions for this placement

Inside the Text editor placement settings, you will see the list of available AI actions.

Text Editor Placement Actions

Enable Generate text

To enable AI text generation inside the editor:

  1. Make sure the Generate text action is enabled in the AI Provider settings:
    Generate text action configuration

  2. In the Text editor placement table, activate the toggle in the Generate text row.

    Enable Generate Text in Placement

Permissions

The Generate text with AI button is only available to users who have the required capability:

aiplacement/editor:generate_text

By default, this capability is allowed for the following roles at the course context level:

  • Manager
  • Editing teacher
  • Teacher
  • Student

If you want to control which roles can see the Generate text with AI button, you can modify this capability as an administrator in:

Site administration > Users > Permissions > Define roles

From there, edit the desired role and adjust the capability:

aiplacement/editor:generate_text

For more information on roles and permissions in Moodle, see the official documentation:

What this enables inside the editor

Once enabled:

  • A Generate text with AI button appears in the TinyMCE editor toolbar.

    AI Button in TinyMCE

  • Clicking Generate text with AI opens a modal window where the user can describe the content they want to generate (for example, topic, length, tone, or audience).

    AI Generate Text Modal

  • After clicking Generate text, the AI starts generating the content and displays a processing indicator.

    AI Processing State

  • When the generation is complete, the generated text is displayed inside the modal window.

    AI Generated Result in Modal

  • At this stage, the user has two options:

    • Regenerate to create a new version of the content.
    • Insert to place the generated text into the editor.
  • After clicking Insert, the generated content appears directly inside the TinyMCE editor and can be edited as needed.

    AI Generated Content Inserted in Editor

Enable Generate image

To enable AI image generation inside the editor:

  1. Make sure the Generate image action is enabled in the AI Provider settings:
    Generate image action configuration

  2. In the Text editor placement table, activate the toggle in the Generate image row.

    Enable Generate Image in Placement

Permissions

The Generate image with AI button is only available to users who have the required capability:

aiplacement/editor:generate_image

By default, this capability is allowed for the following roles at the course context level:

  • Manager
  • Editing teacher
  • Teacher
  • Student

If you want to control which roles can see the Generate image with AI button, you can modify this capability as an administrator in:

Site administration > Users > Permissions > Define roles

For more information about managing roles and permissions in Moodle:

What this enables inside the editor

Once enabled:

  • A Generate image with AI button appears in the TinyMCE editor toolbar.

    AI Image Button in TinyMCE

  • Clicking Generate image with AI opens a modal window where the user can describe the image to generate and configure its parameters.

    AI Generate Image Modal

Image generation parameters

Inside the modal, the user can define:

  • Image description
    A text prompt describing the image to be generated (for example, “Mountain landscape”).

    Image description

  • Image quality

    • Standard: Generates a faster, lower-cost image.
    • High: Generates a higher-quality image with more detail.

    Image quality

  • Image shape

    • Square: 1:1 aspect ratio.
    • Landscape: Horizontal orientation.
    • Portrait: Vertical orientation.

    Image shape

  • After clicking Generate image, the AI starts generating the image and displays a processing indicator.

    AI Image Processing

  • When the generation is complete, the generated image is displayed inside the modal.

    AI Generated Image Result

  • At this stage, the user can:

    • Regenerate to create a new version of the image.
    • Click Next to continue with image details.

    AI Image Details

Insert the image into the editor

After clicking Next, an image details view appears.

In this screen, the user can:

  • Mark the image as decorative.

  • Keep the original size or define a custom size.

  • Edit the alternative text (description for accessibility).

    AI Image Details

Finally, click Save to insert the image into the TinyMCE editor.

The generated image will then appear inside the editor content and can be resized or edited as needed.

AI Image Inserted in Editor