Download the PHP package oliverkroener/ok-ai-writer without Composer
On this page you can find all versions of the php package oliverkroener/ok-ai-writer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download oliverkroener/ok-ai-writer
More information about oliverkroener/ok-ai-writer
Files in oliverkroener/ok-ai-writer
Package ok-ai-writer
Short Description AI Text Generator for CKEditor in TYPO3 - Azure OpenAI integration
License GPL-2.0-or-later
Homepage https://www.oliver-kroener.de
Informations about the package ok-ai-writer
AI Writer for CKEditor (ok_ai_writer)
TYPO3 extension that adds CKEditor 5 toolbar buttons for AI text generation, AI translation, and Lorem Ipsum insertion. Supports both Azure OpenAI and OpenAI (ChatGPT) APIs with per-site configuration and encrypted credential storage.
Features
AI Text Generator
- Adds a sparkle icon button to the CKEditor toolbar
- Opens a chat-style dialog with prompt input and text preview
- Generates HTML content via Azure OpenAI or OpenAI (ChatGPT) chat completions API
- Supports iterative refinement through conversation history
- Previews the generated text before inserting into the editor
- Token usage tracking per session
- Keyboard shortcuts: Enter to generate, Shift+Enter for new line, Escape to close
AI Translate
- Adds a globe icon button to the CKEditor toolbar
- Translates the entire editor content into a selected target language
- Supports 7 languages: Deutsch, English (US), English (UK), Español, Français, Italiano, Türkçe
- Preserves all HTML structure, tags, and attributes during translation
- Auto-replaces editor content on successful translation
- Shares credential configuration with the AI Text Generator
Lorem Ipsum
- Adds a text icon button to the CKEditor toolbar
- Opens a dialog to select the number of paragraphs (1-20, default 3)
- Inserts Lorem Ipsum placeholder text at the cursor position
Per-Site Configuration
- Dedicated backend module (Web > AI Writer) with page tree navigation for per-site credential management
- Encrypted API key storage — API keys are encrypted at rest using Sodium (derived from TYPO3's
encryptionKey) - Global fallback — sites without per-site config automatically use the global extension configuration
- Site-aware middleware — resolves the current site from page context to load the correct credentials
Dark Mode Support
- All dialogs automatically adapt to the TYPO3 backend's dark mode setting
- Detects TYPO3's
data-color-schemeattribute (dark,light, orauto) - Falls back to
prefers-color-schememedia query for theautosetting - Full themed color palette for backgrounds, text, borders, inputs, buttons, and status indicators
Credential Handling
- Production mode: API credentials configured server-side, displayed blinded to editors
- Developer mode: Optional per-user credential overrides via browser localStorage
Requirements
- TYPO3 12.4 LTS, 13.x, or 14.x
- PHP 8.1+
typo3/cms-rte-ckeditor- An Azure OpenAI resource or an OpenAI API key
Installation
Composer (recommended)
Local path repository
Add the package to your repositories and require sections in composer.json:
Then run:
Activate the extension
The database:updateschema step creates the tx_okaiwriter_configuration table used for per-site credential storage.
Configuration
Global Extension Configuration
Open Admin Tools > Settings > Extension Configuration > ok_ai_writer to set the global defaults:
| Setting | Type | Default | Description |
|---|---|---|---|
devMode |
boolean | false |
Allow editors to override credentials in localStorage |
mode |
select | azure |
AI provider: azure or openai |
apiUrl |
string | — | API endpoint URL |
apiKey |
string | — | API key (displayed blinded to editors) |
model |
string | gpt-4o |
Model name (OpenAI mode only, ignored for Azure) |
These values serve as the global fallback for sites without per-site configuration.
Per-Site Configuration (Backend Module)
Navigate to Web > AI Writer in the TYPO3 backend and select a page from the page tree. The module resolves the site root and lets you configure credentials per site:
- Developer Mode — toggle per-user credential overrides
- API Mode — Azure OpenAI or OpenAI (ChatGPT)
- API URL — endpoint URL for the selected provider
- API Key — stored encrypted in the database (Sodium encryption derived from TYPO3's
encryptionKey) - Model — model name (OpenAI mode only)
If no per-site configuration is set, the global extension configuration is used as fallback. The module displays an info banner when the global fallback is active.
Note: The backend module requires admin access and a configured TYPO3 site for the selected page.
RTE Preset Setup
Import the AI Writer YAML into your custom RTE preset and add aiText, aiTranslate, and loremIpsum to your toolbar:
Register your preset in ext_localconf.php:
And activate it via page TSconfig:
Provider Setup
Azure OpenAI
- Create an Azure OpenAI resource in the Azure Portal
- Deploy a model (e.g.
gpt-4,gpt-4o,gpt-35-turbo) - Set
mode = azure,apiUrlto your deployment endpoint,apiKeyto your Azure key - Endpoint URL format:
OpenAI (ChatGPT)
- Create an API key at platform.openai.com
- Set
mode = openai,apiUrl = https://api.openai.com/v1/chat/completions,apiKeyto yoursk-...key - Set
modelto the desired model (e.g.gpt-4o,gpt-4,gpt-3.5-turbo)
Architecture
Configuration Resolution
File Structure
License
GPL-2.0-or-later
Author
Oliver Kroener — oliver-kroener.de — [email protected]
All versions of ok-ai-writer with dependencies
typo3/cms-core Version ^12.4 || ^13 || ^14
typo3/cms-rte-ckeditor Version ^12.4 || ^13 || ^14