Skip to main content

TinyMCE plugin integrating iMio's Omnia AI API for Plone

Project description

AI-powered text actions inside the Plone 6 TinyMCE editor, part of the Omnia suite by iMio.

This package adds a TinyMCE plugin that lets editors expand, improve, reduce, correct, translate or make text accessible — all without leaving the rich-text editor. It relies on imio.omnia.core for API connectivity and the shared Omnia control panel.

Features

The plugin ships seven AI actions, each available from the toolbar button, the right-click context menu, and a keyboard shortcut chord (Alt+O then an action key):

Action

Key

Description

Expand text

d

Make the selected text longer

Improve text

a

Enhance style and quality

Reduce text

r

Shorten the selected text

Correct text

c

Fix spelling and grammar

Make accessible

x

Simplify for WCAG / easy-read compliance

Translate text

t

Translate to a target language

Generate (*)

g

Create new content from a free-text prompt (side panel)

(*) The generate action is disabled by default — it is not yet exposed by the upstream API.

Text transformation actions open a floating panel near the selection (or centred with a blur overlay, depending on the chosen mode). The generate action opens a side panel with prompt input and a history carousel.

Installation

Add the egg to your buildout:

[buildout]

...

eggs =
    imio.omnia.tinymce

Then run bin/buildout.

The package is auto-included in Plone via z3c.autoinclude.plugin, so no ZCML slug is needed.

imio.omnia.core must be installed first. Declare the GenericSetup dependency in your profile’s metadata.xml if you build on top of this package:

<?xml version="1.0"?>
<metadata>
  <version>1000</version>
  <dependencies>
    <dependency>profile-imio.omnia.tinymce:default</dependency>
  </dependencies>
</metadata>

Configuration

All settings are editable from the TinyMCE tab of the Omnia control panel (Site Setup > Omnia > @@omnia-tinymce-settings).

Registry settings

Stored under the prefix imio.omnia.tinymce.browser.controlpanel.IOmniaTinyMCESettings:

Field

Purpose

enabled_features

Tuple of active actions (default: all except generate)

show_toolbar

Display the Omnia toolbar button (default: True)

show_context_menu

Display entries in the context menu (default: True)

enable_shortcuts

Enable keyboard shortcuts (default: True)

translate_languages

Available translation language codes (default: fr, nl, de, en; all options: fr, nl, de, en, es, it)

default_translate_language

Default target language (default: fr)

floating_panel_mode

inline (near selection) or blur (centred overlay)

floating_panel_width

Width in pixels (e.g. 500) or full

How it works

Plugin loading

The TinyMCE plugin is registered via three Plone registry records set by the default GenericSetup profile:

  • plone.custom_plugins — registers the omnia plugin JS (++plone++imio.omnia.tinymce/omnia-tinymce.js).

  • plone.custom_buttons — adds the omnia button to the TinyMCE toolbar.

  • plone.bundles/omnia-tinymce — loads the scoped CSS bundle globally.

Config bridge (viewlet)

An OmniaConfigViewlet registered in plone.htmlhead renders a <script> tag that monkey-patches tinymce.init() to inject omnia_* options read from the Plone registry. This bridges:

  • Settings from IOmniaCoreSettings — base URL, application ID, municipality ID.

  • Settings from IOmniaTinyMCESettings — enabled features, UI mode, shortcuts, translation languages, panel dimensions.

  • An omnia_auth_token — a Plone CSRF authenticator token required by the @@omnia-api proxy for every POST request.

API requests go through the @@omnia-api proxy view provided by imio.omnia.core, so no API credentials are exposed to the browser. By default, callers must have the imio.omnia.core: Access Omnia API proxy permission, which imio.omnia.core grants to Authenticated users.

Uninstall

The uninstall handler removes the omnia entries from plone.custom_plugins and plone.custom_buttons, and disables the CSS bundle.

Frontend development

The TinyMCE plugin source lives in browser/resources/ as a git submodule (ia/omnia-tinymce). Built artifacts are committed to browser/static/.

Rebuild after JS changes:

make build-js          # npm ci + vite build + copy to static/
make clean-js          # remove built artifacts

Run the Storybook dev environment:

make dev               # Storybook on http://localhost:6006

The frontend stack uses Vite (library mode), Preact, Tailwind CSS v4 (om: prefix, scoped to [data-omnia]), and Motion for drag / resize.

Translations

This product has been translated into:

  • English

  • French

Authors

License

The project is licensed under the GPLv2.

Contributors

Changelog

1.0a3 (2026-04-03)

  • Load imio.omnia.core ZCML. [aduchene]

1.0a2 (2026-04-03)

  • Re-release because ZCML files were lacking. [aduchene]

1.0a1 (2026-04-03)

  • Initial release. [duchenean]

  • Added TinyMCE AI plugin with 7 text actions: generate, expand, improve, reduce, correct, translate, and make accessible. [duchenean]

  • Added toolbar button, context menu entry, and keyboard shortcuts for triggering AI actions on selected text. [duchenean]

  • Added floating panel with two display modes: inline (near selection) and blur (centred with overlay), with configurable width. [duchenean]

  • Added translation support with 6 languages (fr, nl, de, en, es, it) and configurable default target language. [duchenean]

  • Added control panel tab (@@omnia-tinymce-settings) in the shared Omnia settings UI: per-feature enable/disable, toolbar/context menu/shortcut toggles, translation languages, and panel display settings. [duchenean]

  • Added viewlet config bridge injecting Omnia settings into TinyMCE init via monkey-patched tinymce.init. [duchenean]

  • Added TinyMCE plugin registration via plone.custom_plugins and CSS bundle via plone.bundles/omnia-tinymce with Tailwind CSS scoped to [data-omnia]. [duchenean]

  • Added clean uninstall removing plugin registrations and CSS bundle. [duchenean]

  • Added i18n support (en, fr). [duchenean]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

imio_omnia_tinymce-1.0a3.tar.gz (682.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

imio_omnia_tinymce-1.0a3-py3-none-any.whl (694.3 kB view details)

Uploaded Python 3

File details

Details for the file imio_omnia_tinymce-1.0a3.tar.gz.

File metadata

  • Download URL: imio_omnia_tinymce-1.0a3.tar.gz
  • Upload date:
  • Size: 682.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for imio_omnia_tinymce-1.0a3.tar.gz
Algorithm Hash digest
SHA256 279b0bd7693c7f46b05f552255511f93f77dfdb21ac2644251e8425c8a905363
MD5 8791c57980fc639d08a5d9174c993567
BLAKE2b-256 40c3121d072fd4463eb9c9594598243d3b97eb14abf723ca3ed84ebfa865008f

See more details on using hashes here.

File details

Details for the file imio_omnia_tinymce-1.0a3-py3-none-any.whl.

File metadata

File hashes

Hashes for imio_omnia_tinymce-1.0a3-py3-none-any.whl
Algorithm Hash digest
SHA256 803a5b8b78a3dc6c1963c0c942c6c2e3621487d0770335815a32fee58bcbe012
MD5 bc4bae73d6169c68c56ef6c3fabcd213
BLAKE2b-256 885266cf707529fa00ad43c09af8f93a50e413351d8070d94d7d4fbd8c35d682

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page