From d80028c5b827709184edce486f1453c7c2fffb40 Mon Sep 17 00:00:00 2001 From: Stefan Uebe Date: Wed, 11 Mar 2026 12:54:32 +0100 Subject: [PATCH 01/10] bumped versions, extended gitignore --- .gitignore | 36 ++++++++++++++++++++++++++++++++---- pom.xml | 27 +++++++++++++-------------- 2 files changed, 45 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index 2d77c04..3797f5b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,32 @@ -target -node_modules -frontend/generated -src/main/dev-bundle +/build/ +node_modules/ +**/target/ +/.idea/ +/src/main/resources/application.properties +.DS_Store +.project +*.mv.db +*.trace.db +.classpath +.settings +*.iml +webpack.config.js +package*json +webpack.generated.js +rebel.xml +pnpm-lock.yaml +pnpmfile.js +/webpack.generated.js +**/frontend/generated +.npmrc +.pnpmfile.cjs +frontend/index.html +tsconfig.json +types.d.ts +vite.config.ts +vite.generated.ts +index.html +.devcontainer/ +.claude/ +.playwright-mcp/ +/.flattened-pom.xml diff --git a/pom.xml b/pom.xml index 097b0f7..383306e 100755 --- a/pom.xml +++ b/pom.xml @@ -3,17 +3,16 @@ org.parttio tinymce-for-flow - 4.2.8-SNAPSHOT + 5.0.0-SNAPSHOT TinyMCE for Flow Integration of TinyMCE for Vaadin 10+ https://github.com/parttio/tinymce-for-flow - 17 - 17 + 21 UTF-8 UTF-8 - 24.3.1 + 25.0.7 Team Parttio @@ -65,7 +64,7 @@ org.springframework.boot spring-boot-dependencies - 3.2.0 + 4.0.3 pom import @@ -102,13 +101,13 @@ in.virit mopo - 0.0.1 + 0.0.6 test in.virit viritin - 2.3.1 + 3.2.0 test @@ -144,7 +143,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.3.0 + 3.5.0 META-INF/VAADIN/config/flow-build-info.json @@ -157,7 +156,7 @@ org.apache.maven.plugins maven-release-plugin - 2.5.3 + 3.3.1 true false @@ -169,7 +168,7 @@ org.codehaus.mojo flatten-maven-plugin - 1.5.0 + 1.7.0 oss @@ -203,7 +202,7 @@ org.sonatype.central central-publishing-maven-plugin - 0.7.0 + 0.10.0 true central @@ -213,7 +212,7 @@ org.apache.maven.plugins maven-source-plugin - 3.2.1 + 3.4.0 attach-sources @@ -226,7 +225,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.1 + 3.12.0 attach-javadocs @@ -239,7 +238,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.2.4 + 3.2.8 sign-artifacts From ab3be1de7042ed04f4f1ac770068ef97d38aab49 Mon Sep 17 00:00:00 2001 From: Stefan Uebe Date: Wed, 11 Mar 2026 13:22:39 +0100 Subject: [PATCH 02/10] Json conversion, some additional pom fixes --- pom.xml | 11 ++++ src/main/java/org/vaadin/tinymce/TinyMce.java | 55 ++++++++----------- .../vaadin/tinymce/ConfigurationOptions.java | 2 +- 3 files changed, 35 insertions(+), 33 deletions(-) diff --git a/pom.xml b/pom.xml index 383306e..f51ff10 100755 --- a/pom.xml +++ b/pom.xml @@ -76,6 +76,17 @@ com.vaadin vaadin-core + + com.vaadin + vaadin-dev + true + + + com.vaadin + copilot + + + com.vaadin diff --git a/src/main/java/org/vaadin/tinymce/TinyMce.java b/src/main/java/org/vaadin/tinymce/TinyMce.java index e679c2d..e525ba8 100644 --- a/src/main/java/org/vaadin/tinymce/TinyMce.java +++ b/src/main/java/org/vaadin/tinymce/TinyMce.java @@ -32,10 +32,10 @@ import com.vaadin.flow.dom.ShadowRoot; import com.vaadin.flow.function.SerializableConsumer; import com.vaadin.flow.shared.Registration; -import elemental.json.Json; -import elemental.json.JsonArray; -import elemental.json.JsonObject; -import elemental.json.JsonValue; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.node.ArrayNode; +import tools.jackson.databind.node.JsonNodeFactory; +import tools.jackson.databind.node.ObjectNode; import java.util.Arrays; import java.util.UUID; @@ -61,7 +61,7 @@ public class TinyMce extends AbstractCompositeField private boolean initialContentSent; private String currentValue = ""; private String rawConfig; - JsonObject config = Json.createObject(); + ObjectNode config = JsonNodeFactory.instance.objectNode(); private Element ta = new Element("div"); private int debounceTimeout = 0; @@ -95,10 +95,8 @@ public TinyMce(boolean shadowRoot) { domListenerRegistration = getElement().addEventListener("tchange", (DomEventListener) event -> { - boolean value = event.getEventData() - .hasKey("event.htmlString"); String htmlString = event.getEventData() - .getString("event.htmlString"); + .get("event.htmlString").asText(); currentValue = htmlString; setModelValue(htmlString, true); }); @@ -219,10 +217,10 @@ private void initConnector() { rawConfig = "{}"; } ui.getPage().executeJs( - "const editor = $0;" + "const rawconfig = " + rawConfig + ";\n" + - "window.Vaadin.Flow.tinymceConnector.initLazy(rawconfig, $0, $1, $2, $3, $4)", - getElement(), ta, config, currentValue, + "const options = " + config + ";\n" + + "window.Vaadin.Flow.tinymceConnector.initLazy(rawconfig, $0, $1, options, $2, $3)", + getElement(), ta, currentValue, (enabled && !readOnly)) .then(res -> initialContentSent = true); }); @@ -257,11 +255,11 @@ public TinyMce configure(String configurationKey, String value) { } public TinyMce configure(String configurationKey, String... value) { - JsonArray array = Json.createArray(); - for (int i = 0; i < value.length; i++) { - array.set(i, value[i]); + ArrayNode array = JsonNodeFactory.instance.arrayNode(); + for (String v : value) { + array.add(v); } - config.put(configurationKey, array); + config.set(configurationKey, array); return this; } @@ -402,21 +400,14 @@ public TinyMce configurePlugin(boolean basicTinyMCE, Plugin... plugins) { createBasicTinyMce(); } - JsonArray jsonArray = config.get("plugins"); - int initialIndex = 0; + JsonNode existing = config.get("plugins"); + ArrayNode jsonArray = (existing instanceof ArrayNode a) ? a : JsonNodeFactory.instance.arrayNode(); - if (jsonArray != null) { - initialIndex = jsonArray.length(); - } else { - jsonArray = Json.createArray(); - } - - for (int i = 0; i < plugins.length; i++) { - jsonArray.set(initialIndex, plugins[i].pluginLabel); - initialIndex++; + for (Plugin plugin : plugins) { + jsonArray.add(plugin.pluginLabel); } - config.put("plugins", jsonArray); + config.set("plugins", jsonArray); return this; } @@ -429,8 +420,8 @@ public TinyMce configureMenubar(boolean basicTinyMCE, Menubar... menubars) { .collect(Collectors.joining(" ")); String menubar; - if (config.hasKey("menubar")) { - menubar = config.getString("menubar"); + if (config.has("menubar")) { + menubar = config.get("menubar").asText(); menubar = menubar + " " + newconfig; } else { menubar = newconfig; @@ -445,11 +436,11 @@ public TinyMce configureToolbar(boolean basicTinyMCE, Toolbar... toolbars) { createBasicTinyMce(); } - JsonValue jsonValue = config.get("toolbar"); + JsonNode jsonNode = config.get("toolbar"); String toolbarStr = ""; - if (jsonValue != null) { - toolbarStr = toolbarStr.concat(jsonValue.asString()); + if (jsonNode != null) { + toolbarStr = jsonNode.asText(); } for (int i = 0; i < toolbars.length; i++) { diff --git a/src/test/java/org/vaadin/tinymce/ConfigurationOptions.java b/src/test/java/org/vaadin/tinymce/ConfigurationOptions.java index 4c188b6..53ab5b6 100644 --- a/src/test/java/org/vaadin/tinymce/ConfigurationOptions.java +++ b/src/test/java/org/vaadin/tinymce/ConfigurationOptions.java @@ -36,7 +36,7 @@ private TinyMce addWithConfig() { add(tinyMce); getElement().getNode().runWhenAttached(ui -> ui .beforeClientResponse(this, context -> { - pre.setText(tinyMce.config.toJson()); + pre.setText(tinyMce.config.toString()); })); return tinyMce; } From 08273444d9259fd5674b9025687e13c04cfb7b3e Mon Sep 17 00:00:00 2001 From: Stefan Uebe Date: Wed, 11 Mar 2026 13:24:12 +0100 Subject: [PATCH 03/10] Added claude md --- CLAUDE.md | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..f0d264a --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,67 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Project Overview + +TinyMCE for Flow — a Vaadin 25 add-on that wraps the TinyMCE rich text editor as a Java server-side component. The component value is plain HTML and it implements `HasValue` for Vaadin Binder compatibility. + +**Maven coordinates:** `org.parttio:tinymce-for-flow` +**Java package:** `org.vaadin.tinymce` +**Java version:** 21 +**Stack:** Vaadin 25, Spring Boot 4 + +## Build & Test Commands + +```bash +mvn clean package # Full build (compile + test + package) +mvn compile # Compile only +mvn test # Run all tests (requires Playwright/Chromium) +mvn test -Dtest=MopoSmokeTest # Run a single test class +mvn test -Dtest=MopoSmokeTest#smokeTest # Run a single test method +``` + +The test suite uses Spring Boot with `RANDOM_PORT` and Playwright (via [Mopo](https://github.com/nickvdyck/mopo)) for browser-based E2E tests. Tests launch a real Chromium browser. + +## Running the Demo Server + +```bash +mvn spring-boot:run -pl . -Dspring-boot.run.main-class=org.vaadin.tinymce.Application +``` + +Test/demo views are `@Route`-annotated classes in `src/test/java` (e.g., `DemoView`, `EditorInDialog`, `ImageUploadsEnabledView`). + +## Architecture + +### Server-side (Java) + +- **`TinyMce`** (`src/main/java/.../TinyMce.java`) — The main component. Extends `AbstractCompositeField` so it works with Vaadin's data binding. Manages editor lifecycle (attach/detach/reattach), config assembly, and JS connector initialization. +- **`Plugin`**, **`Toolbar`**, **`Menubar`** — Enums providing type-safe constants for TinyMCE plugin names, toolbar buttons, and menu sections. +- **`Language`** — Enum for supported TinyMCE UI languages. +- **`ValueChangeMode`** — Enum controlling when value changes propagate (BLUR, TIMEOUT, CHANGE). + +Configuration is accumulated into a `tools.jackson.databind.node.ObjectNode config` field via `configure()` / `configurePlugin()` / `configureToolbar()` / `configureMenubar()` methods and serialized inline into the JS connector call on attach. A raw JS config string can also be set via `setConfig(String)`. + +### Jackson 3 + +Vaadin 25 ships with **Jackson 3**, which uses `tools.jackson.*` packages — not the older `com.fasterxml.jackson.*`. Use `tools.jackson.databind.node.ObjectNode`, `ArrayNode`, `JsonNodeFactory`, `JsonNode` for any JSON handling. Vaadin's own `DomEvent.getEventData()` also returns a `tools.jackson.databind.JsonNode` in Vaadin 25. + +### Client-side (JavaScript) + +- **`tinymceConnector.js`** (`src/main/resources/META-INF/resources/frontend/`) — The connector that bridges Vaadin's server-side component to the TinyMCE JS library. Handles `initLazy`, content sync via custom DOM events (`tchange`, `tblur`, `tfocus`), and Dialog/shadow-DOM workarounds. +- **Bundled TinyMCE** — A full TinyMCE distribution lives under `src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/`. This is vendored; do not edit these files. + +### Key design notes + +- The component does **not** use Shadow DOM by default. The deprecated `TinyMce(boolean shadowRoot)` constructor exists for legacy Dialog support but is no longer needed. +- On detach, `tinymce.get(id).remove()` is called to clean up the TinyMCE instance. On reattach, the connector re-initializes. +- TinyMCE doesn't work well inside Shadow DOM — menu overlays and keyboard navigation require special handling (see the `isInDialog` workaround in the connector). +- The `vaadin-dev` dependency (optional, with `copilot` excluded) is required in the main dependencies for the Vaadin dev-mode server to start during tests. Without it, `'vaadin-dev-server' not found` is thrown at servlet context initialization. + +## Release Process + +```bash +mvn release:prepare release:clean +``` + +A GitHub Action handles `release:perform` — it builds and pushes to Maven Central automatically on tagged commits. From 4c4cf32b654c6d27e9be5a196490abb5d743872c Mon Sep 17 00:00:00 2001 From: Stefan Uebe Date: Wed, 11 Mar 2026 13:35:37 +0100 Subject: [PATCH 04/10] added stylesheets, added test scope for dev --- pom.xml | 1 + src/test/java/org/vaadin/tinymce/Application.java | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f51ff10..3db0977 100755 --- a/pom.xml +++ b/pom.xml @@ -80,6 +80,7 @@ com.vaadin vaadin-dev true + test com.vaadin diff --git a/src/test/java/org/vaadin/tinymce/Application.java b/src/test/java/org/vaadin/tinymce/Application.java index 82306b9..5144927 100644 --- a/src/test/java/org/vaadin/tinymce/Application.java +++ b/src/test/java/org/vaadin/tinymce/Application.java @@ -1,5 +1,8 @@ package org.vaadin.tinymce; +import com.vaadin.flow.component.dependency.StyleSheet; +import com.vaadin.flow.component.page.AppShellConfigurator; +import com.vaadin.flow.theme.lumo.Lumo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -7,7 +10,8 @@ * Spring Boot app to run test UIs. */ @SpringBootApplication -public class Application { +@StyleSheet(Lumo.STYLESHEET) +public class Application implements AppShellConfigurator { public static void main(String[] args) { SpringApplication.run(Application.class, args); From 2fbd36eb2e2dfeb9a587fcff18252e284c046e80 Mon Sep 17 00:00:00 2001 From: Stefan Uebe Date: Wed, 11 Mar 2026 13:46:08 +0100 Subject: [PATCH 05/10] Changed Github CI Java versions to 21 --- .github/workflows/ci-build.yml | 4 ++-- .github/workflows/release-build.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index ec4fc75..fe71b52 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -9,10 +9,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v3 with: - java-version: '17' + java-version: '21' distribution: 'temurin' - name: Build with Maven run: mvn --batch-mode --update-snapshots install diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 08778eb..316ff18 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -9,10 +9,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v3 with: - java-version: '17' + java-version: '21' distribution: 'temurin' server-id: central server-username: CENTRAL_U From 6027b41511b4a9879650aef3f0b167c396cba47b Mon Sep 17 00:00:00 2001 From: Stefan Uebe Date: Wed, 11 Mar 2026 13:54:15 +0100 Subject: [PATCH 06/10] =?UTF-8?q?Add=20TinyMCE=206=E2=86=927=20migration?= =?UTF-8?q?=20plan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- TINYMCE7_MIGRATION_PLAN.md | 164 +++++++++++++++++++++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 TINYMCE7_MIGRATION_PLAN.md diff --git a/TINYMCE7_MIGRATION_PLAN.md b/TINYMCE7_MIGRATION_PLAN.md new file mode 100644 index 0000000..12dbd4b --- /dev/null +++ b/TINYMCE7_MIGRATION_PLAN.md @@ -0,0 +1,164 @@ +# Plan: Migrate TinyMCE for Flow from v6 to v7 + +## Context + +The project bundles TinyMCE **6.6.1** (vendored under `src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/`). TinyMCE 7 (released 2024) introduced: +- Removal of `tabfocus`, `template` plugins from self-hosted open-source +- `advlist` merged into the `lists` plugin (passing both is harmless but `advlist` alone adds nothing) +- `accordion` plugin became open-source (was premium in v6) +- Toolbar button `fontname` renamed to `fontfamily` +- New `fontsizeinput` toolbar button +- `sandbox_iframes` now defaults to `true` (behaviour change for embedded iframe content) +- The JS init/event/content API is fully backwards compatible + +**Goal:** Replace the bundled JS with TinyMCE 7, update Java enums to reflect v7 API changes, fix the internal default toolbar/plugin config that would silently break — all with no Java compile-time breaking changes (deprecated constants are kept, new ones added). + +--- + +## Files to Modify + +| File | Change | +|------|--------| +| `src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/` | Full directory replacement with TinyMCE 7 bundle | +| `src/main/java/org/vaadin/tinymce/Plugin.java` | Add `ACCORDION`, add `@Deprecated` to removed plugins | +| `src/main/java/org/vaadin/tinymce/Toolbar.java` | Add `FONT_FAMILY` + `FONT_SIZE_INPUT`, add `@Deprecated` to renamed/removed buttons | +| `src/main/java/org/vaadin/tinymce/TinyMce.java` | Fix `createBasicTinyMce()`: replace `FORMAT_SELECT` → `BLOCKS`, remove `ADVLIST` | +| `src/main/resources/META-INF/resources/frontend/tinymceLumo.css` | Review `.tox-*` selectors for TinyMCE 7 skin compatibility | +| `src/main/resources/META-INF/resources/frontend/tinymceConnector.js` | No changes needed (TinyMCE 7 JS API is fully compatible; `tox-tinymce-aux` confirmed present in v7) | + +--- + +## Step-by-Step Implementation + +### Step 1 — Download TinyMCE 7 + +```bash +cd /tmp && npm install tinymce@7 --no-save +# installs latest stable TinyMCE 7.x into /tmp/node_modules/tinymce/ +``` + +Pin the exact patch version used (e.g., `7.6.0`) in a comment in `TinyMce.java`'s `injectTinyMceScript()` for traceability. + +### Step 2 — Replace Bundled TinyMCE + +> **IMPORTANT — token efficiency:** Use only Bash commands for Steps 1 & 2. Do NOT use the Read tool on any TinyMCE files (tinymce.min.js is ~6MB, plugins are large). Just run the shell commands below — no file inspection needed. If you encounter issues during this process, ask the user before using other tooling. + +```bash +rm -rf src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/ +cp -r /tmp/node_modules/tinymce/ src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/ +``` + +> TinyMCE 7 npm package keeps the same directory layout. The `context://frontend/tinymce_addon/tinymce/tinymce.min.js` path used in `TinyMce.java:injectTinyMceScript()` remains valid. + +### Step 3 — Update `Plugin.java` + +**Add** (new in TinyMCE 7 open-source): +```java +ACCORDION("accordion"), +``` + +**Add `@Deprecated`** to plugins absent from TinyMCE 7 self-hosted: + +| Enum constant | Reason | +|---------------|--------| +| `COLORPICKER` | Removed in TinyMCE 5 | +| `CONTEXTMENU` | Removed in TinyMCE 5 | +| `FULLPAGE` | Removed in TinyMCE 6 | +| `HR` | Removed in TinyMCE 6 (now native element) | +| `IMAGE_TOOLS` | Removed in TinyMCE 6 | +| `LEGACYOUTPUT` | Removed in TinyMCE 6 | +| `PASTE` | Merged into core in TinyMCE 6 | +| `PRINT` | Removed in TinyMCE 6 | +| `SPELLCHECKER` | Cloud-only since TinyMCE 6, not self-hosted | +| `TABFOCUS` | **Removed in TinyMCE 7** | +| `TEMPLATE` | **Removed in TinyMCE 7** (use premium `advtemplate`) | +| `TEXT_COLOR` | Removed in TinyMCE 6 | +| `ADVLIST` | **Merged into `lists` in TinyMCE 7** — use `Plugin.LISTS` | + +### Step 4 — Update `Toolbar.java` + +**Add** (new / correct names in TinyMCE 7): +```java +FONT_FAMILY("fontfamily"), // replaces FONTNAME, renamed in TinyMCE 7 +FONT_SIZE_INPUT("fontsizeinput"), // new direct-input font size widget in TinyMCE 7 +``` + +**Add `@Deprecated`** to renamed/removed toolbar buttons: + +| Enum constant | Reason | +|---------------|--------| +| `FONTNAME` | Renamed to `fontfamily` in TinyMCE 7; use `FONT_FAMILY` | +| `FORMAT_SELECT` | Renamed to `blocks` in TinyMCE 6; `BLOCKS` already exists | +| `FONTSELECT` | String value `"FONTSELECT"` is wrong case — was never functional; use `FONT_FAMILY` | +| `FONTSIZESELECT` | String value `"FONTSIZESELECT"` is wrong case — was never functional; use `FONTSIZE` | +| `PRINT` | Plugin was removed in TinyMCE 6 | + +### Step 5 — Fix `createBasicTinyMce()` in `TinyMce.java` (line 380) + +This internal default configuration used deprecated/broken constants. Update to valid TinyMCE 7 equivalents (not a public API change): + +- `Toolbar.FORMAT_SELECT` → `Toolbar.BLOCKS` +- `Plugin.ADVLIST` removed from the plugin list + +Before: +```java +this.configurePlugin(false, Plugin.ADVLIST, Plugin.AUTOLINK, Plugin.LISTS, Plugin.SEARCH_REPLACE); +this.configureToolbar(false, ..., Toolbar.FORMAT_SELECT, ...); +``` + +After: +```java +this.configurePlugin(false, Plugin.AUTOLINK, Plugin.LISTS, Plugin.SEARCH_REPLACE); +this.configureToolbar(false, ..., Toolbar.BLOCKS, ...); +``` + +### Step 6 — Review `tinymceLumo.css` + +`src/main/resources/META-INF/resources/frontend/tinymceLumo.css` uses TinyMCE internal class names. Most are stable v6→v7, but verify: + +- **`.tox-toolbar-overlord`** (lines 7, 19, 25) — TinyMCE 7 reorganised the toolbar DOM. This class may no longer exist; update selectors if needed. +- `.tox-toolbar__primary`, `.tox-editor-header`, `.tox-menubar`, `.tox-tbtn`, `.tox-mbtn` — expected to still be present. + +If `.tox-toolbar-overlord` is gone, toolbar background/padding styling silently stops applying (visual regression, not functional). + +### Step 7 — Note `sandbox_iframes` Behaviour Change + +Add a Javadoc comment to `TinyMce.java` (class-level or in `setConfig()`) noting: + +> **TinyMCE 7 change:** `sandbox_iframes` defaults to `true` in TinyMCE 7, which sandboxes any iframes in editor content. To restore the TinyMCE 6 behaviour, add `configure("sandbox_iframes", false)`. + +--- + +## What Does NOT Change + +- `tinymceConnector.js` — all TinyMCE 7 JS APIs are backwards compatible +- `Language.java` enum — language codes are the same; lang files are replaced as part of the bundle swap in Step 2 +- `Menubar.java` — no menubar changes in TinyMCE 7 +- `ValueChangeMode.java` — no changes +- Java class structure, method signatures, package names — all unchanged + +--- + +## Verification + +```bash +# 1. Full build +mvn clean package + +# 2. Start demo server +mvn spring-boot:run -pl . -Dspring-boot.run.main-class=org.vaadin.tinymce.Application + +# 3. Manual checks in browser: +# a. http://localhost:8080/ — editor renders with TinyMCE 7 UI +# - In browser console: tinymce.majorVersion should be "7" +# - Typing, value-change events, blur/focus all work +# - No console errors or warnings about unknown plugins +# b. http://localhost:8080/editor-in-dialog — editor inside Dialog +# - Menus/dropdowns open correctly (tox-tinymce-aux workaround) +# - Keyboard navigation works inside dialog +# c. http://localhost:8080/image-uploads-enabled-view — image upload flow +# d. Browser console is clean (no TinyMCE warnings about removed plugins) + +# 4. Run E2E smoke test +mvn test -Dtest=MopoSmokeTest +``` From 484fa7820abcaf3b1a145a75b4021e56ebdeeccc Mon Sep 17 00:00:00 2001 From: Stefan Uebe Date: Wed, 11 Mar 2026 14:29:14 +0100 Subject: [PATCH 07/10] Migrate bundled TinyMCE from 6.6.1 to 7.9.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace vendored TinyMCE bundle with 7.9.2 - Plugin: add ACCORDION (now open-source in v7), deprecate 13 removed/merged plugins - Toolbar: add FONT_FAMILY + FONT_SIZE_INPUT, deprecate 5 renamed/removed buttons - TinyMce: fix createBasicTinyMce() — remove ADVLIST, replace FORMAT_SELECT→BLOCKS - TinyMce: document sandbox_iframes default-true behaviour change in v7 Co-Authored-By: Claude Sonnet 4.6 --- src/main/java/org/vaadin/tinymce/Plugin.java | 55 +- src/main/java/org/vaadin/tinymce/TinyMce.java | 11 +- src/main/java/org/vaadin/tinymce/Toolbar.java | 22 + .../tinymce_addon/tinymce/CHANGELOG.md | 3795 ++ .../frontend/tinymce_addon/tinymce/README.md | 77 + .../frontend/tinymce_addon/tinymce/bower.json | 27 + .../tinymce_addon/tinymce/composer.json | 52 + .../tinymce/icons/default/icons.js | 231 + .../tinymce/icons/default/icons.min.js | 2 +- .../tinymce/icons/default/index.js | 7 + .../tinymce_addon/tinymce/langs/README.md | 3 - .../tinymce_addon/tinymce/langs/bg_BG.js | 1 - .../tinymce_addon/tinymce/langs/cs.js | 1 - .../tinymce_addon/tinymce/langs/da.js | 1 - .../tinymce_addon/tinymce/langs/de.js | 1 - .../tinymce_addon/tinymce/langs/es.js | 1 - .../tinymce_addon/tinymce/langs/et.js | 1 - .../tinymce_addon/tinymce/langs/fi.js | 1 - .../tinymce_addon/tinymce/langs/fr_FR.js | 1 - .../tinymce_addon/tinymce/langs/hr.js | 1 - .../tinymce_addon/tinymce/langs/it.js | 1 - .../tinymce_addon/tinymce/langs/lt.js | 1 - .../tinymce_addon/tinymce/langs/lv.js | 1 - .../tinymce_addon/tinymce/langs/nb_NO.js | 1 - .../tinymce_addon/tinymce/langs/nl.js | 1 - .../tinymce_addon/tinymce/langs/pl.js | 1 - .../tinymce_addon/tinymce/langs/pt_PT.js | 1 - .../tinymce_addon/tinymce/langs/ro.js | 1 - .../tinymce_addon/tinymce/langs/ru.js | 1 - .../tinymce_addon/tinymce/langs/sk.js | 1 - .../tinymce_addon/tinymce/langs/sl_SI.js | 1 - .../tinymce_addon/tinymce/langs/sr.js | 1 - .../tinymce_addon/tinymce/langs/sv_SE.js | 1 - .../tinymce_addon/tinymce/langs/tr.js | 1 - .../tinymce_addon/tinymce/langs/uk.js | 1 - .../frontend/tinymce_addon/tinymce/license.md | 6 + .../tinymce_addon/tinymce/license.txt | 21 - .../tinymce_addon/tinymce/models/dom/index.js | 7 + .../tinymce_addon/tinymce/models/dom/model.js | 8994 ++++ .../tinymce/models/dom/model.min.js | 5 +- .../tinymce_addon/tinymce/notices.txt | 21 + .../tinymce/plugins/accordion/index.js | 7 + .../tinymce/plugins/accordion/plugin.js | 1349 + .../tinymce/plugins/accordion/plugin.min.js | 5 +- .../tinymce/plugins/advlist/index.js | 7 + .../tinymce/plugins/advlist/plugin.js | 471 + .../tinymce/plugins/advlist/plugin.min.js | 5 +- .../tinymce/plugins/anchor/index.js | 7 + .../tinymce/plugins/anchor/plugin.js | 237 + .../tinymce/plugins/anchor/plugin.min.js | 5 +- .../tinymce/plugins/autolink/index.js | 7 + .../tinymce/plugins/autolink/plugin.js | 318 + .../tinymce/plugins/autolink/plugin.min.js | 5 +- .../tinymce/plugins/autoresize/index.js | 7 + .../tinymce/plugins/autoresize/plugin.js | 223 + .../tinymce/plugins/autoresize/plugin.min.js | 5 +- .../tinymce/plugins/autosave/index.js | 7 + .../tinymce/plugins/autosave/plugin.js | 252 + .../tinymce/plugins/autosave/plugin.min.js | 5 +- .../tinymce/plugins/charmap/index.js | 7 + .../tinymce/plugins/charmap/plugin.js | 997 + .../tinymce/plugins/charmap/plugin.min.js | 5 +- .../tinymce/plugins/code/index.js | 7 + .../tinymce/plugins/code/plugin.js | 97 + .../tinymce/plugins/code/plugin.min.js | 3 - .../tinymce/plugins/codesample/index.js | 7 + .../tinymce/plugins/codesample/plugin.js | 3654 ++ .../tinymce/plugins/codesample/plugin.min.js | 11 +- .../tinymce/plugins/directionality/index.js | 7 + .../tinymce/plugins/directionality/plugin.js | 636 + .../plugins/directionality/plugin.min.js | 5 +- .../tinymce/plugins/emoticons/index.js | 7 + .../plugins/emoticons/js/emojiimages.min.js | 2 - .../plugins/emoticons/js/emojis.min.js | 1 - .../tinymce/plugins/emoticons/plugin.js | 809 + .../tinymce/plugins/emoticons/plugin.min.js | 5 +- .../tinymce/plugins/fullscreen/index.js | 7 + .../tinymce/plugins/fullscreen/plugin.js | 1609 + .../tinymce/plugins/fullscreen/plugin.min.js | 5 +- .../tinymce/plugins/help/index.js | 7 + .../tinymce/plugins/help/js/i18n/keynav/ar.js | 15 +- .../plugins/help/js/i18n/keynav/bg_BG.js | 15 +- .../tinymce/plugins/help/js/i18n/keynav/ca.js | 15 +- .../tinymce/plugins/help/js/i18n/keynav/cs.js | 15 +- .../tinymce/plugins/help/js/i18n/keynav/da.js | 15 +- .../tinymce/plugins/help/js/i18n/keynav/de.js | 15 +- .../tinymce/plugins/help/js/i18n/keynav/el.js | 15 +- .../tinymce/plugins/help/js/i18n/keynav/en.js | 15 +- .../tinymce/plugins/help/js/i18n/keynav/es.js | 15 +- .../tinymce/plugins/help/js/i18n/keynav/eu.js | 17 +- .../tinymce/plugins/help/js/i18n/keynav/fa.js | 15 +- .../tinymce/plugins/help/js/i18n/keynav/fi.js | 15 +- .../plugins/help/js/i18n/keynav/fr_FR.js | 15 +- .../plugins/help/js/i18n/keynav/he_IL.js | 15 +- .../tinymce/plugins/help/js/i18n/keynav/hi.js | 15 +- .../tinymce/plugins/help/js/i18n/keynav/hr.js | 15 +- .../plugins/help/js/i18n/keynav/hu_HU.js | 15 +- .../tinymce/plugins/help/js/i18n/keynav/id.js | 15 +- .../tinymce/plugins/help/js/i18n/keynav/it.js | 15 +- .../tinymce/plugins/help/js/i18n/keynav/ja.js | 15 +- .../tinymce/plugins/help/js/i18n/keynav/kk.js | 15 +- .../plugins/help/js/i18n/keynav/ko_KR.js | 15 +- .../tinymce/plugins/help/js/i18n/keynav/ms.js | 15 +- .../plugins/help/js/i18n/keynav/nb_NO.js | 15 +- .../tinymce/plugins/help/js/i18n/keynav/nl.js | 15 +- .../tinymce/plugins/help/js/i18n/keynav/pl.js | 15 +- .../plugins/help/js/i18n/keynav/pt_BR.js | 15 +- .../plugins/help/js/i18n/keynav/pt_PT.js | 15 +- .../tinymce/plugins/help/js/i18n/keynav/ro.js | 15 +- .../tinymce/plugins/help/js/i18n/keynav/ru.js | 15 +- .../tinymce/plugins/help/js/i18n/keynav/sk.js | 15 +- .../plugins/help/js/i18n/keynav/sl_SI.js | 15 +- .../plugins/help/js/i18n/keynav/sv_SE.js | 15 +- .../plugins/help/js/i18n/keynav/th_TH.js | 15 +- .../tinymce/plugins/help/js/i18n/keynav/tr.js | 15 +- .../tinymce/plugins/help/js/i18n/keynav/uk.js | 15 +- .../tinymce/plugins/help/js/i18n/keynav/vi.js | 15 +- .../plugins/help/js/i18n/keynav/zh_CN.js | 23 +- .../plugins/help/js/i18n/keynav/zh_TW.js | 15 +- .../tinymce/plugins/help/plugin.js | 828 + .../tinymce/plugins/help/plugin.min.js | 5 +- .../tinymce/plugins/image/index.js | 7 + .../tinymce/plugins/image/plugin.js | 1689 + .../tinymce/plugins/image/plugin.min.js | 5 +- .../tinymce/plugins/importcss/index.js | 7 + .../tinymce/plugins/importcss/plugin.js | 403 + .../tinymce/plugins/importcss/plugin.min.js | 5 +- .../tinymce/plugins/insertdatetime/index.js | 7 + .../tinymce/plugins/insertdatetime/plugin.js | 186 + .../plugins/insertdatetime/plugin.min.js | 5 +- .../tinymce/plugins/link/index.js | 7 + .../tinymce/plugins/link/plugin.js | 1577 + .../tinymce/plugins/link/plugin.min.js | 5 +- .../tinymce/plugins/lists/index.js | 7 + .../tinymce/plugins/lists/plugin.js | 2544 + .../tinymce/plugins/lists/plugin.min.js | 5 +- .../tinymce/plugins/media/index.js | 7 + .../tinymce/plugins/media/plugin.js | 1450 + .../tinymce/plugins/media/plugin.min.js | 5 +- .../tinymce/plugins/nonbreaking/index.js | 7 + .../tinymce/plugins/nonbreaking/plugin.js | 128 + .../tinymce/plugins/nonbreaking/plugin.min.js | 3 - .../tinymce/plugins/pagebreak/index.js | 7 + .../tinymce/plugins/pagebreak/plugin.js | 123 + .../tinymce/plugins/pagebreak/plugin.min.js | 3 - .../tinymce/plugins/preview/index.js | 7 + .../tinymce/plugins/preview/plugin.js | 765 + .../tinymce/plugins/preview/plugin.min.js | 5 +- .../tinymce/plugins/quickbars/index.js | 7 + .../tinymce/plugins/quickbars/plugin.js | 654 + .../tinymce/plugins/quickbars/plugin.min.js | 5 +- .../tinymce/plugins/save/index.js | 7 + .../tinymce/plugins/save/plugin.js | 136 + .../tinymce/plugins/save/plugin.min.js | 5 +- .../tinymce/plugins/searchreplace/index.js | 7 + .../tinymce/plugins/searchreplace/plugin.js | 1370 + .../plugins/searchreplace/plugin.min.js | 5 +- .../tinymce/plugins/table/index.js | 7 + .../tinymce/plugins/table/plugin.js | 4019 ++ .../tinymce/plugins/table/plugin.min.js | 5 +- .../tinymce/plugins/template/plugin.min.js | 4 - .../tinymce/plugins/visualblocks/index.js | 7 + .../tinymce/plugins/visualblocks/plugin.js | 106 + .../plugins/visualblocks/plugin.min.js | 5 +- .../tinymce/plugins/visualchars/index.js | 7 + .../tinymce/plugins/visualchars/plugin.js | 809 + .../tinymce/plugins/visualchars/plugin.min.js | 5 +- .../tinymce/plugins/wordcount/index.js | 7 + .../tinymce/plugins/wordcount/plugin.js | 480 + .../tinymce/plugins/wordcount/plugin.min.js | 5 +- .../tinymce/skins/content/dark/content.css | 75 + .../tinymce/skins/content/dark/content.js | 10 + .../skins/content/dark/content.min.css | 9 + .../tinymce/skins/content/default/content.css | 70 + .../tinymce/skins/content/default/content.js | 10 + .../skins/content/default/content.min.css | 9 + .../skins/content/document/content.css | 75 + .../tinymce/skins/content/document/content.js | 10 + .../skins/content/document/content.min.css | 9 + .../skins/content/tinymce-5-dark/content.css | 75 + .../skins/content/tinymce-5-dark/content.js | 10 + .../content/tinymce-5-dark/content.min.css | 9 + .../skins/content/tinymce-5/content.css | 70 + .../skins/content/tinymce-5/content.js | 10 + .../skins/content/tinymce-5/content.min.css | 9 + .../tinymce/skins/content/writer/content.css | 71 + .../tinymce/skins/content/writer/content.js | 10 + .../skins/content/writer/content.min.css | 9 + .../tinymce/skins/ui/oxide-dark/content.css | 881 + .../skins/ui/oxide-dark/content.inline.css | 887 + .../skins/ui/oxide-dark/content.inline.js | 10 + .../ui/oxide-dark/content.inline.min.css | 11 +- .../tinymce/skins/ui/oxide-dark/content.js | 10 + .../skins/ui/oxide-dark/content.min.css | 11 +- .../tinymce/skins/ui/oxide-dark/skin.css | 5144 ++ .../tinymce/skins/ui/oxide-dark/skin.js | 1 + .../tinymce/skins/ui/oxide-dark/skin.min.css | 2 +- .../skins/ui/oxide-dark/skin.shadowdom.css | 30 + .../skins/ui/oxide-dark/skin.shadowdom.js | 1 + .../tinymce/skins/ui/oxide/content.css | 893 + .../tinymce/skins/ui/oxide/content.inline.css | 887 + .../tinymce/skins/ui/oxide/content.inline.js | 10 + .../skins/ui/oxide/content.inline.min.css | 11 +- .../tinymce/skins/ui/oxide/content.js | 10 + .../tinymce/skins/ui/oxide/content.min.css | 11 +- .../tinymce/skins/ui/oxide/skin.css | 5141 ++ .../tinymce/skins/ui/oxide/skin.js | 1 + .../tinymce/skins/ui/oxide/skin.min.css | 2 +- .../tinymce/skins/ui/oxide/skin.shadowdom.css | 30 + .../tinymce/skins/ui/oxide/skin.shadowdom.js | 1 + .../skins/ui/tinymce-5-dark/content.css | 881 + .../ui/tinymce-5-dark/content.inline.css | 887 + .../skins/ui/tinymce-5-dark/content.inline.js | 10 + .../ui/tinymce-5-dark/content.inline.min.css | 11 +- .../skins/ui/tinymce-5-dark/content.js | 10 + .../skins/ui/tinymce-5-dark/content.min.css | 11 +- .../tinymce/skins/ui/tinymce-5-dark/skin.css | 5260 +++ .../tinymce/skins/ui/tinymce-5-dark/skin.js | 1 + .../skins/ui/tinymce-5-dark/skin.min.css | 2 +- .../ui/tinymce-5-dark/skin.shadowdom.css | 30 + .../skins/ui/tinymce-5-dark/skin.shadowdom.js | 1 + .../tinymce/skins/ui/tinymce-5/content.css | 893 + .../skins/ui/tinymce-5/content.inline.css | 887 + .../skins/ui/tinymce-5/content.inline.js | 10 + .../skins/ui/tinymce-5/content.inline.min.css | 11 +- .../tinymce/skins/ui/tinymce-5/content.js | 10 + .../skins/ui/tinymce-5/content.min.css | 11 +- .../tinymce/skins/ui/tinymce-5/skin.css | 5260 +++ .../tinymce/skins/ui/tinymce-5/skin.js | 1 + .../tinymce/skins/ui/tinymce-5/skin.min.css | 2 +- .../skins/ui/tinymce-5/skin.shadowdom.css | 30 + .../skins/ui/tinymce-5/skin.shadowdom.js | 1 + .../tinymce/themes/silver/index.js | 7 + .../tinymce/themes/silver/theme.js | 34802 ++++++++++++++ .../tinymce/themes/silver/theme.min.js | 5 +- .../tinymce_addon/tinymce/tinymce.d.ts | 457 +- .../frontend/tinymce_addon/tinymce/tinymce.js | 38716 ++++++++++++++++ .../tinymce_addon/tinymce/tinymce.min.js | 10 +- 238 files changed, 144389 insertions(+), 592 deletions(-) create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/CHANGELOG.md create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/README.md create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/bower.json create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/composer.json create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/icons/default/icons.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/icons/default/index.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/README.md delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/bg_BG.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/cs.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/da.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/de.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/es.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/et.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/fi.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/fr_FR.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/hr.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/it.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/lt.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/lv.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/nb_NO.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/nl.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/pl.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/pt_PT.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/ro.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/ru.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/sk.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/sl_SI.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/sr.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/sv_SE.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/tr.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/langs/uk.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/license.md delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/license.txt create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/models/dom/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/models/dom/model.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/notices.txt create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/accordion/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/accordion/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/advlist/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/advlist/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/anchor/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/anchor/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/autolink/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/autolink/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/autoresize/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/autoresize/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/autosave/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/autosave/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/charmap/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/charmap/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/code/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/code/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/codesample/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/codesample/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/directionality/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/directionality/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/emoticons/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/emoticons/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/fullscreen/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/fullscreen/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/help/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/help/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/image/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/image/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/importcss/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/importcss/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/insertdatetime/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/insertdatetime/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/link/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/link/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/lists/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/lists/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/media/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/media/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/nonbreaking/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/nonbreaking/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/pagebreak/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/pagebreak/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/preview/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/preview/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/quickbars/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/quickbars/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/save/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/save/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/searchreplace/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/searchreplace/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/table/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/table/plugin.js delete mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/template/plugin.min.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/visualblocks/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/visualblocks/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/visualchars/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/visualchars/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/wordcount/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/plugins/wordcount/plugin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/content/dark/content.css create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/content/dark/content.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/content/default/content.css create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/content/default/content.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/content/document/content.css create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/content/document/content.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/content/tinymce-5-dark/content.css create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/content/tinymce-5-dark/content.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/content/tinymce-5/content.css create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/content/tinymce-5/content.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/content/writer/content.css create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/content/writer/content.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/oxide-dark/content.css create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/oxide-dark/content.inline.css create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/oxide-dark/content.inline.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/oxide-dark/content.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/oxide-dark/skin.css create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/oxide-dark/skin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/oxide-dark/skin.shadowdom.css create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/oxide-dark/skin.shadowdom.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/oxide/content.css create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/oxide/content.inline.css create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/oxide/content.inline.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/oxide/content.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/oxide/skin.css create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/oxide/skin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/oxide/skin.shadowdom.css create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/oxide/skin.shadowdom.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/tinymce-5-dark/content.css create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/tinymce-5-dark/content.inline.css create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/tinymce-5-dark/content.inline.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/tinymce-5-dark/content.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/tinymce-5-dark/skin.css create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/tinymce-5-dark/skin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.css create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/tinymce-5/content.css create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/tinymce-5/content.inline.css create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/tinymce-5/content.inline.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/tinymce-5/content.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/tinymce-5/skin.css create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/tinymce-5/skin.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/tinymce-5/skin.shadowdom.css create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/skins/ui/tinymce-5/skin.shadowdom.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/themes/silver/index.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/themes/silver/theme.js create mode 100644 src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/tinymce.js diff --git a/src/main/java/org/vaadin/tinymce/Plugin.java b/src/main/java/org/vaadin/tinymce/Plugin.java index 9d904be..3e1ed97 100644 --- a/src/main/java/org/vaadin/tinymce/Plugin.java +++ b/src/main/java/org/vaadin/tinymce/Plugin.java @@ -1,7 +1,12 @@ package org.vaadin.tinymce; public enum Plugin { - //@formatter:off + //@formatter:off + ACCORDION("accordion"), + /** + * @deprecated Merged into the {@code lists} plugin in TinyMCE 7. Use {@link #LISTS} instead. + */ + @Deprecated ADVLIST("advlist"), ANCHOR("anchor"), AUTOLINK("autolink"), @@ -10,18 +15,42 @@ public enum Plugin { CHARMAP("charmap"), CODE("code"), CODESAMPLE("codesample"), + /** + * @deprecated Removed in TinyMCE 5. + */ + @Deprecated COLORPICKER("colorpicker"), + /** + * @deprecated Removed in TinyMCE 5. + */ + @Deprecated CONTEXTMENU("contextmenu"), DIRECTIONALITY("directionality"), EMOTICONS("emoticons"), + /** + * @deprecated Removed in TinyMCE 6. + */ + @Deprecated FULLPAGE("fullpage"), FULLSCREEN("fullscreen"), HELP("help"), + /** + * @deprecated Removed in TinyMCE 6. + */ + @Deprecated HR("hr"), IMAGE("image"), + /** + * @deprecated Removed in TinyMCE 6. + */ + @Deprecated IMAGE_TOOLS("imagetools"), IMPORT_CSS("importcss"), INSERT_DATETIME("insertdatetime"), + /** + * @deprecated Removed in TinyMCE 6. + */ + @Deprecated LEGACYOUTPUT("legacyoutput"), LINK("link"), LISTS("lists"), @@ -29,16 +58,40 @@ public enum Plugin { NONBREAKING("nonbreaking"), NONEDITABLE("noneditable"), PAGEBREAK("pagebreak"), + /** + * @deprecated Merged into core in TinyMCE 6. + */ + @Deprecated PASTE("paste"), PREVIEW("preview"), + /** + * @deprecated Removed in TinyMCE 6. + */ + @Deprecated PRINT("print"), QUICKBARS("quickbars"), SAVE("save"), SEARCH_REPLACE("searchreplace"), + /** + * @deprecated Cloud-only since TinyMCE 6, not available in self-hosted. + */ + @Deprecated SPELLCHECKER("spellchecker"), + /** + * @deprecated Removed in TinyMCE 7. + */ + @Deprecated TABFOCUS("tabfocus"), TABLE("table"), + /** + * @deprecated Removed in TinyMCE 7. Use the premium {@code advtemplate} plugin. + */ + @Deprecated TEMPLATE("template"), + /** + * @deprecated Removed in TinyMCE 6. + */ + @Deprecated TEXT_COLOR("textcolor"), TEXT_PATTERN("textpattern"), VISUAL_BLOCKS("visualblocks"), diff --git a/src/main/java/org/vaadin/tinymce/TinyMce.java b/src/main/java/org/vaadin/tinymce/TinyMce.java index e525ba8..c4deb38 100644 --- a/src/main/java/org/vaadin/tinymce/TinyMce.java +++ b/src/main/java/org/vaadin/tinymce/TinyMce.java @@ -47,6 +47,13 @@ * Some configurations has Java shorthand, some must be adjusted via * getElement().setAttribute(String, String). See full options via * https://www.tiny.cloud/docs/integrations/webcomponent/ + *

+ * TinyMCE 7 change: {@code sandbox_iframes} defaults to + * {@code true} in TinyMCE 7, which sandboxes any iframes in editor content. + * To restore the TinyMCE 6 behaviour, call + * {@code configure("sandbox_iframes", false)}. + *

+ * Bundled TinyMCE version: 7.9.2 * * @author mstahv */ @@ -381,12 +388,12 @@ private TinyMce createBasicTinyMce() { setValue(""); this.configure("branding", false); this.basicTinyMCECreated = true; - this.configurePlugin(false, Plugin.ADVLIST, Plugin.AUTOLINK, + this.configurePlugin(false, Plugin.AUTOLINK, Plugin.LISTS, Plugin.SEARCH_REPLACE); this.configureMenubar(false, Menubar.FILE, Menubar.EDIT, Menubar.VIEW, Menubar.FORMAT); this.configureToolbar(false, Toolbar.UNDO, Toolbar.REDO, - Toolbar.SEPARATOR, Toolbar.FORMAT_SELECT, Toolbar.SEPARATOR, + Toolbar.SEPARATOR, Toolbar.BLOCKS, Toolbar.SEPARATOR, Toolbar.BOLD, Toolbar.ITALIC, Toolbar.SEPARATOR, Toolbar.ALIGN_LEFT, Toolbar.ALIGN_CENTER, Toolbar.ALIGN_RIGHT, Toolbar.ALIGN_JUSTIFY, Toolbar.SEPARATOR, Toolbar.OUTDENT, diff --git a/src/main/java/org/vaadin/tinymce/Toolbar.java b/src/main/java/org/vaadin/tinymce/Toolbar.java index 5589fa5..641e9c6 100644 --- a/src/main/java/org/vaadin/tinymce/Toolbar.java +++ b/src/main/java/org/vaadin/tinymce/Toolbar.java @@ -5,6 +5,10 @@ public enum Toolbar { SEPARATOR("|"), UNDO("undo"), REDO("redo"), + /** + * @deprecated Renamed to {@code blocks} in TinyMCE 6. Use {@link #BLOCKS} instead. + */ + @Deprecated FORMAT_SELECT("formatselect"), BLOCKS("blocks"), BOLD("bold"), @@ -17,8 +21,14 @@ public enum Toolbar { ALIGN_CENTER("aligncenter"), ALIGN_RIGHT("alignright"), ALIGN_JUSTIFY("alignjustify"), + /** + * @deprecated Renamed to {@code fontfamily} in TinyMCE 7. Use {@link #FONT_FAMILY} instead. + */ + @Deprecated FONTNAME("fontname"), + FONT_FAMILY("fontfamily"), FONTSIZE("fontsize"), + FONT_SIZE_INPUT("fontsizeinput"), BLOCKQUOTE("blockquote"), NUMLIST("numlist"), BULLIST("bullist"), @@ -36,12 +46,24 @@ public enum Toolbar { TABLE_DELETE_ROW("tabledeleterow"), TABLE_INSERT_COL_BEFORE("tableinsertcolbefore"), TABLE_INSERT_COL_AFTER("tableinsertcolafter"), + /** + * @deprecated String value has wrong case and was never functional. Use {@link #FONT_FAMILY} instead. + */ + @Deprecated FONTSELECT("FONTSELECT"), + /** + * @deprecated String value has wrong case and was never functional. Use {@link #FONTSIZE} instead. + */ + @Deprecated FONTSIZESELECT("FONTSIZESELECT"), EMOTICONS("emoticons"), LINK("link"), IMAGE("image"), MEDIA("media"), + /** + * @deprecated The print plugin was removed in TinyMCE 6. + */ + @Deprecated PRINT("print"), INSERT_DATETIME("insertdatetime"); //@formatter:on diff --git a/src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/CHANGELOG.md b/src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/CHANGELOG.md new file mode 100644 index 0000000..5e6b142 --- /dev/null +++ b/src/main/resources/META-INF/resources/frontend/tinymce_addon/tinymce/CHANGELOG.md @@ -0,0 +1,3795 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), +and is generated by [Changie](https://github.com/miniscruff/changie). + +## 7.9.2 - 2026-02-11 + +### Deprecated +- The default value of `allow_html_in_comments` will change from `true` to `false` in TinyMCE 8.x. #TINY-11900 + +### Security +- Updated dependencies and parsing logic for enhanced content sanitization. HTML-like content in comments and certain legacy patterns are now sanitized more strictly when `xss_sanitization` is enabled (default). The Introduced `allow_html_in_comments` option provides control over comment node sanitization behavior. + #TINY-11900 +- Introduced `allow_html_in_comments` option (boolean, default: `true`) to control handling of HTML-like syntax in comment nodes. This option will default to `false` in TinyMCE 8.x. #TINY-11900 + +## 7.9.1 - 2025-05-29 + +### Improved +- Update `Notices` file and minified notices. #TINY-12091 + +## 7.9.0 - 2025-05-15 + +### Added +- Added new `disc` style option for unordered lists. #TINY-12015 + +### Improved +- The resize cursor now points in the correct direction for each resize mode. Patch contributed by daniloff200. ##GH-10189 +- If `style_formats` is empty, the button is now disabled. #TINY-12005 +- Inline dialog dropdowns reposition when the dialog is dragged or the window is scrolled. #TINY-11368 +- Bullet list icons were have been updated to better represent the default styles. #TINY-12014 + +### Changed +- The ContextFormSizeInput lock button is now centered instead of aligned to the end. #TINY-11916 +- Changed the default value of `advlist_bullet_styles` option to `default,disc,circle,square`. #TINY-12083 + +### Fixed +- Autolink no longer overrides already existing links when autolinking. #TINY-11836 +- Removed the deprecated CSS media selector `-ms-high-contrast`. #TINY-11876 +- The `mceInsertContent` command no longer deletes the parent block element when an anchor is selected. #TINY-11953 +- Table resizers are now visible when inline editor has a z-index property. #TINY-11981 +- Tabbing inside a `figcaption` element no longer displays two text insertion carets. #TINY-11997 +- Pressing Enter before a floating image no longer duplicates the image. #TINY-11676 +- Editor did not scroll into viewport on receiving focus on Chrome and Safari. #TINY-12017 +- Select UI elements was not properly styled on Chrome version 136. #TINY-12131 + +## 7.8.0 - 2025-04-09 + +### Added +- New subtoolbar support for context toolbars. #TINY-11748 +- New `extended_mathml_attributes` and `extended_mathml_elements` options. #TINY-11756 +- New `onboarding` option. #TINY-11931 + +### Improved +- Focus outline was misaligned with comment card border on saving an edit. #TINY-11329 +- The `editor.selection.scrollIntoView()` method now pads the target scroll area with a small margin, ensuring content doesn't sit at the very edge of the viewport. #TINY-11786 + +### Changed +- Changed promotional text and link. #TINY-11905 + +### Fixed +- Setting editor height to a `pt` or `em` value was ignoring min/max height settings. #TINY-11108 + +## 7.7.2 - 2025-03-19 + +### Fixed +- Error was thrown when pressing tab in the last cell of a non-editable table. #TINY-11797 +- Error was thrown when trying to use the context form API after a component was detached. #TINY-11781 +- Deleting an empty block within an

  • element would move cursor to the end of the
  • . #TINY-11763 +- Deleting an empty block that was between two lists would throw an Error when all three elements were nested inside a list. #TINY-11763 + +## 7.7.1 - 2025-03-05 + +### Fixed +- Skin UI content CSS was truncated when bundling, causing CSS styles to be missing. #TINY-11875 +- Context forms used to disappear if their input was disabled in the `onSetup` API. #TINY-11890 + +## 7.7.0 - 2025-02-20 + +### Added +- `link_attributes_postprocess` option that allows overriding attributes of a link that would be inserted through the link dialog. #TINY-11707 + +### Improved +- Improved visual indication of keyboard focus in annotations that contain an image. #TINY-11596 +- The type now defaults to `info` when `editor.notificationManager.open()` is used without a specified type or with an invalid one. #TINY-11661 + +### Changed +- Updated the `link` plugin behavior to move the cursor outside of the link when inserted or edited via the UI. Patch contributed by Philipp91. #GH-9998 + +### Fixed +- Keyboard navigation for size inputs in context forms. #TINY-11394 +- Keyboard navigation for context form sliders. #TINY-11482 +- The `insertContent` API was not replacing selected non-editable elements correctly. #TINY-11714 +- Context toolbar inputs had incorrect margins. #TINY-11624 +- Iframe aria text no longer suggests opening the help dialog when the help plugin is not enabled. #TINY-11672 +- Preview dialog no longer opens anchor links in a new tab. #TINY-11740 +- The `float` property was not properly removed on the image when converting a image into a captioned image. #TINY-11670 +- Expanding selection to word didn't work inside inline editing host elements. #TINY-11304 +- The `semantics` element in MathML was not properly retained when `annotation` elements were allowed. #TINY-11755 +- It was possible to tab to a toolbar group that had all children disabled. #TINY-11665 +- Keyboard navigation would get stuck on the 'more' toolbar button. #TINY-11762 +- Toolbar groups had both a `title` attribute and a custom tooltip, causing overlapping tooltips #TINY-11768 +- Toolbar text field did not render focus correctly. #TINY-11658 + +## 7.6.1 - 2025-01-22 + +### Fixed +- Text input was prevented in form elements in the contents of the editor. #TINY-11446 +- Opening a notification when the toolbar is positioned at the bottom of the editor threw an error. #TINY-11498 +- Table resize bars were not properly aligned for inline editors inside scrollable containers. #TINY-11215 + +## 7.6.0 - 2024-12-11 + +### Added +- It is now possible to create labeled groups in context toolbars. #TINY-11095 +- New `contextsliderform` and `contextsizeinput` context form types. #TINY-11342 +- New `back` function in `ContextFormApi` to go back to the previous toolbar. #TINY-11344 +- New `QuickbarInsertImage` command that is executed by the `quickimage` button. #TINY-11399 +- New `onSetup` function to the context form API. #TINY-11494 +- New `placeholder` to the context form input field API. #TINY-11459 +- New `disabled` option to restore the previous `readonly` mode behavior, allowing the editor to be displayed in a disabled state. #TINY-11488 + +### Improved +- Base64 data was not properly decoded due to unhandled URL-encoded characters. #TINY-9548 +- The `latin` list style type is now recognized as an alias for the `alpha` list style type. #TINY-11515 + +### Fixed +- Image selection was removed when calling `editor.nodeChanged()` while having focus inside the editor UI. #TINY-11437 +- Tooltip would not show for group toolbar button. #TINY-11391 +- Changing the table row type when a `contenteditable=false` cell was selected would not work as expected. #TINY-11383 +- The `samp` format was being applied as a `block` level format, instead of an `inline` format. #TINY-11390 +- Removed title attribute from dialog tree elements as they already have a tooltip. #TINY-11470 +- Fixed CSS bundling for skin UI content CSS. #TINY-11558 +- Fixed incorrect resource keys for CSS bundling JS files. #TINY-11558 + +## 7.5.0 - 2024-11-06 + +### Added +- Added support for using raw CSS in the list of possible colours, using the `color_map_raw` property. #GH-9788 + +### Improved +- Improved color picker aria support. #TINY-11291 + +### Fixed +- Autocompleter would not activate after applying an inline format like font size in some cases. #TINY-11273 +- The `toolbar-sticky-offset` would still be applied after entering fullscreen mode. #TINY-11137 +- Text and background color toolbar buttons would not be fully greyed out in readonly mode. #TINY-11313 +- Closing a nested modal dialog would lose focus from the editor. #TINY-11153 +- Inability to type '{' character on German keyboard layouts. #TINY-11395 + +## 7.4.1 - 2024-10-10 + +### Fixed +- Invalid HTML elements within SVG elements were not removed. #TINY-11332 + +## 7.4.0 - 2024-10-09 + +### Added +- New `context` property for all ui components. This allows buttons and menu items to be enabled or disabled based on whether their context matches a given predicate; status updates are checked on `init`, `NodeChange`, and `SwitchMode` events. #TINY-11211 +- Tree component now allows the addition of a custom icon. #TINY-11131 +- Added focus function to view button api. #TINY-11122 +- New option `allow_mathml_annotation_encodings` to opt-in to keep math annotations with specific encodings. #TINY-11166 +- Added global `color-active` LESS variable for use in editor skins. #TINY-11266 + +### Improved +- In read-only mode the editor now allows normal cursor movement and block element selection, including video playback. #TINY-11264 +- Pasting a table now places the cursor after the table instead of into the last cell. #TINY-11082 +- Dialog list dropdown menus now close when the browser window resizes. #TINY-11123 + +### Fixed +- Mouse hover on partially visible dialog collection elements no longer scrolls. #TINY-9915 +- Caret would unexpectedly shift to the non-editable table row above when pressing Enter. #TINY-11077 +- Deleting a selection in a list element would sometimes prevent the `input` event from being dispatched. #TINY-11100 +- Placing the cursor after a table with a br after it would misplace added newlines before the table instead of after. #TINY-11110 +- Sidebar could not be toggled until the skin was loaded. #TINY-11155 +- The image dialog lost focus after closing an image upload error alert. #TINY-11159 +- Copying tables to the clipboard did not correctly separate cells and rows for the "text/plain" MIME type. #TINY-10847 +- The editor resize handle was incorrectly rendered when all components were removed from the status bar. #TINY-11257 + +## 7.3.0 - 2024-08-07 + +### Added +- Colorpicker number input fields now show an error tooltip and error icon when invalid text has been entered. #TINY-10799 +- New `format-code` icon. #TINY-11018 + +### Improved +- When a full document was loaded as editor content the head elements were added to the body. #TINY-11053 + +### Fixed +- Unnecessary nbsp entities were inserted when typing at the edges of inline elements. #TINY-10854 +- Fixed JavaScript error when inserting a table using the context menu by adjusting the event order in `renderInsertTableMenuItem`. #TINY-6887 +- Notifications didn't position and resize properly when resizing the editor or toggling views. #TINY-10894 +- The pattern commands would execute even if the command was not enabled. #TINY-10994 +- Split button popups were incorrectly positioned when switching to fullscreen mode if the editor was inside a scrollable container. #TINY-10973 +- Sequential html comments would in some cases generate unwanted elements. #TINY-10955 +- The listbox component had a fixed width and was not a responsive ui element. #TINY-10884 +- Prevent default mousedown on toolbar buttons was causing misplaced focus bugs. #TINY-10638 +- Attempting to use focus commands on an editor where the cursor had last been in certain contentEditable="true" elements would fail. #TINY-11085 +- Colorpicker's hex-based input field showed the wrong validation error message. #TINY-11115 + +## 7.2.1 - 2024-07-03 + +### Fixed +- Text content could move unexpectedly when deleting a paragraph. #TINY-10590 +- Cursor would shift to the start of the editor body when focus was shifted to a noneditable cell of a table. #TINY-10127 +- Long translations of the bottom help text would cause minor graphical issues. #TINY-10961 +- Open Link button was disabled when selection partially covered a link or when multiple links were selected. #TINY-11009 + +## 7.2.0 - 2024-06-19 + +### Added +- Added `options.debug` API that logs the initial raw editor options to console. #TINY-10605 +- Added `referrerpolicy` as a valid attribute for an iframe element. #TINY-10374 +- New `onInit` and `stretched` properties to the `HtmlPanel` dialog component. #TINY-10900 +- Added support for querying the state of the `mceTogglePlainTextPaste` command. #TINY-10938 +- Added `for` option to dialog label components to improve accessibility. The value must be another component on the same dialog. #TINY-10971 + +### Improved +- Dialog slider components now emit an onChange event when using arrow keys. #TINY-10428 +- Accessibility for element path buttons, added tooltip to describe the button and removed incorrect `aria-level` attribute. #TINY-10891 +- Improve merging of inserted inline elements by removing nodes with redundant inheritable styles. #TINY-10869 +- Improved Find & Replace dialog accessibility by changing placeholders to labels. #TINY-10871 + +### Changed +- Replaced tiny branding logo with `Build with TinyMCE` text and logo. #TINY-11001 + +### Fixed +- Deleting in a `div` with preceeding `br` elements would sometimes throw errors. #TINY-10840 +- `autoresize_bottom_margin` was not reliably applied in some situations. #TINY-10793 +- Fixed cases where adding a newline around a br, table or img would not move the cursor to a new line. #TINY-10384 +- Focusing on `contenteditable="true"` element when using `editable_root: false` and inline mode causing selection to be shifted. #TINY-10820 +- Corrected the `role` attribute on listbox dialog components to `combobox` when there are no nested menu items. #TINY-10807 +- HTML entities that were double decoded in `noscript` elements caused an XSS vulnerability. #TINY-11019 +- It was possible to inject XSS HTML that was not matching the regexp when using the `noneditable_regexp` option. #TINY-11022 + +## 7.1.2 - 2024-06-05 + +### Fixed +- CSS color values set to `transparent` were incorrectly converted to '#000000`. #TINY-10916 + +## 7.1.1 - 2024-05-22 + +### Fixed +- Insert/Edit image dialog lost focus after the image upload completed. #TINY-10885 +- Deleting into a list from a paragraph that has an `img` tag could cause extra inline styles to be added. #TINY-10892 +- Resolved an issue where emojis configured with the `emojiimages` database were not loading correctly due to a broken CDN. #TINY-10878 +- Iframes in dialogs were not rendering rounded borders correctly. #TINY-10901 +- Autocompleter possible values are no longer capped at a length of 10. #TINY-10942 + +## 7.1.0 - 2024-05-08 + +### Added +- Parser support for math elements. #TINY-10809 +- New `math-equation` icon. #TINY-10804 + +### Improved +- Included `itemprop`, `itemscope` and `itemtype` as valid HTML5 attributes in the core schema. #TINY-9932 +- Notification accessibility improvements: added tooltips, keyboard navigation and shortcut to focus on notifications. #TINY-6925 +- Removed `aria-pressed` from the `More` button in sliding toolbar mode and replaced it with `aria-expanded`. #TINY-10795 +- The editor UI now renders correctly in Windows High Contrast Mode. #TINY-10781 + +### Fixed +- Backspacing in certain html setups resulted in data moving around unexpectedly. #TINY-10590 +- Dialog title markup changed to use an `h1` element instead of `div`. #TINY-10800 +- Dialog title was not announced in macOS VoiceOver, dialogs now use `aria-label` instead of `aria-labelledby` on macOS. #TINY-10808 +- Theme loader did not respect the suffix when it was loading skin CSS files. #TINY-10602 +- Custom block elements with colon characters would throw errors. #TINY-10813 +- Tab navigation in views didn't work. #TINY-10780 +- Video and audio elements could not be played on Safari. #TINY-10774 +- `ToggleToolbarDrawer` command did not toggle the toolbar in `sliding` mode when `{skipFocus: true}` parameter was passed. #TINY-10726 +- The buttons in the custom view header were clipped on when overflowing. #TINY-10741 +- In the custom view, the scrollbar of the container was not visible if its height was greater than the editor. #TINY-10741 +- Fixed accessibility issue by removing duplicate `role="menu"` attribute from color swatches. #TINY-10806 +- Fullscreen mode now prevents focus from leaving the editor. #TINY-10597 +- Open link context menu action did not work with selection surrounding a link. #TINY-10391 +- Styles were not retained when toggling a list on and off. #TINY-10837 +- Caret and placeholder text were invisible in Windows High Contrast Mode. #TINY-9811 +- Firefox did not announce the iframe title when `iframe_aria_text` was set. #TINY-10718 +- Notification width was not constrained to the width of the editor. #TINY-10886 +- Open link context menu action was not enabled for links on images. #TINY-10391 + +## 7.0.1 - 2024-04-10 + +### Fixed +- Toggle list behavior generated wrong html when the `forced_root_block` option was set to `div`. #TINY-10488 +- Tapping inside a composed text on Firefox Android would not close the autocompleter. #TINY-10715 +- An inline editor toolbar now behaves correctly in horizontally scrolled containers. #TINY-10684 +- Tooltips unintended shrinking and incorrectly positioned when shown in horizontally scrollable container. #TINY-10797 +- The status bar was invisible when the editor's height is short. #TINY-10705 + +## 7.0.0 - 2024-03-20 + +### Added +- New `license_key` option that must be set to `gpl` or a valid license key. #TINY-10681 +- New custom tooltip functionality, tooltip will be shown when hovering with a mouse or with keyboard focus. #TINY-9275 +- New `sandbox_iframes_exclusions` option that holds a list of URL host names to be excluded from iframe sandboxing when `sandbox_iframes` is set to `true`. #TINY-10350 +- Added 'getAllEmojis' api function to the emoticons plugin. #TINY-10572 +- Element preset support for the `valid_children` option and Schema.addValidChildren API. #TINY-9979 +- A new `trigger` property for block text pattern configurations, allowing pattern activation with either Space or Enter keys. #TINY-10324 +- onFocus callback for CustomEditor dialog component. #TINY-10596 +- icons for the import from Word, export to Word and export to PDF premium plugins. #TINY-10612 +- `data` is now a valid element in the Schema. #TINY-10611 +- More advanced schema config for custom elements. #TINY-9980 +- Custom tooltip for autocompleter, now visible on both mouse hover and keyboard focus, except single column cases. #TINY-9638 + +### Improved +- Included keyboard shortcut in custom tooltip for `ToolbarButton` and `ToolbarToggleButton`. #TINY-10487 +- Improved showing which element has focus for keyboard navigation. #TINY-9176 +- Custom tooltips will now show for items in `collection` which is rendered inside a dialog, on mouse hover and keyboard focus. #TINY-9637 +- Autocompleter will now work with IMEs. #TINY-10637 +- Make table ghost element better reflect height changes when resizing. #TINY-10658 + +### Changed +- TinyMCE is now licensed GPL Version 2 or later. #TINY-10578 +- `convert_unsafe_embeds` editor option is now defaulted to `true`. #TINY-10351 +- `sandbox_iframes` editor option is now defaulted to `true`. #TINY-10350 +- The DOMUtils.isEmpty API function has been modified to consider nodes containing only comments as empty. #TINY-10459 +- The `highlight_on_focus` option now defaults to true, adding a focus outline to every editor. #TINY-10574 +- Delay before the tooltip to show up, from 800ms to 300ms. #TINY-10475 +- Now `tox-view__pane` has `position: relative` instead of `static`. #TINY-10561 +- Update outbound link for statusbar Tiny logo #TINY-10494 +- Remove the height field from the `table` plugin cell dialog. The `table` plugin row dialog now controls the row height by setting the height on the `tr` element, not the `td` elements. #TINY-10617 +- Change table height resizing handling to remove heights from `td`/`th` elements and only apply to `tr` elements. #TINY-10589 +- Removed incorrect `aria-placeholder` attribute from editor body when `placeholder` option is set. #TINY-10452 +- The `tooltip` property for dialog's footer `togglebutton` is now optional. #TINY-10672 +- Changed the `media_url_resolver` option to use promises. #TINY-9154 +- `Styles` bespoke toolbar button fallback changed to `Formats` if `Paragraph` is not configured in `style_formats` option. #TINY-10603 +- Updated deprecation/removed console message. #TINY-10694 + +### Removed +- Deprecated `force_hex_color` option, with the default now being all colors are forced to hex format as lower case. #TINY-10436 +- Deprecated `remove_trailing_brs` option from DomParser. #TINY-10454 +- `title` attribute on buttons with visible label. #TINY-10453 +- `InsertOrderedList` and `InsertUnorderedList` commands from core, these now only exist in the `lists` plugin. #TINY-10644 +- `closeButton` from the notification API, close buttons in notifications are now required. #TINY-10646 +- The autocompleter `ch` configuration property has been removed. Use the `trigger` property instead. #TINY-8929 +- Deprecated `template` plugin. #TINY-10654 + +### Fixed +- When deleting the last row in a table, the cursor would jump to the first cell (top left), instead of moving to the next adjacent cell in some cases. #TINY-6309 +- Heading formatting would be partially applied to the content within the `summary` element when the caret was positioned between words. #TINY-10312 +- Moving focus to the outside of the editor after having clicked a menu would not fire a `blur` event as expected. #TINY-10310 +- Autocomplete would sometimes cause corrupt data when starting during text composition. #TINY-10317 +- Inline mode with persisted toolbar would show regardless of the skin being loaded, causing css issues. #TINY-10482 +- Table classes couldn't be removed via setting an empty value in `table_class_list`. Also fixed being forced to pick the first class option. #TINY-6653 +- Directly right clicking on a ol's li in FireFox didn't enable the button `List Properties...` in the context menu. #TINY-10490 +- The `link_default_target` option wasn't considered when inserting a link via `quicklink` toolbar. #TINY-10439 +- When inline editor toolbar wrapped to multiple lines the top wasn't always calculated correctly. #TINY-10580 +- Removed manually dispatching dragend event on drop in Firefox. #TINY-10389 +- Slovenian help dialog content had a dot in the wrong place. #TINY-10601 +- Pressing Backspace at the start of an empty `summary` element within a `details` element nested in a list item no longer removes the `summary` element. #TINY-10303 +- The toolbar width was miscalculated for the inline editor positioned inside a scrollable container. #TINY-10581 +- Fixed incorrect object processor for `event_root` option. #TINY-10433 +- Adding newline after using `selection.setContent` to insert a block element would throw an unhandled exception. #TINY-10560 +- Floating toolbar buttons in inline editor incorrectly wrapped into multiple rows on window resizing or zooming. #TINY-10570 +- When setting table border width and `table_style_by_css` is true, only the border attribute is set to 0 and border-width styling is no longer used. #TINY-10308 +- Clicking to the left or right of a non-editable div in Firefox would show two cursors. #TINY-10314 + +## 6.8.3 - 2024-02-08 + +### Changed +- Update outbound TinyMCE website links. #TINY-10491 + +### Fixed +- The floating toolbar would not be fully visible when the editor was placed inside a scrollable container. #TINY-10335 +- ShadowDOM skin was not loaded properly when used with js bundling feature. #TINY-10451 + +## 6.8.2 - 2023-12-11 + +### Fixed +- Bespoke select toolbar buttons including `fontfamily`, `fontsize`, `blocks`, and `styles` incorrectly used plural words in their accessible names. #TINY-10426 +- The `align` bespoke select toolbar button had an accessible name that was misleading and grammatically incorrect in certain cases. #TINY-10435 +- Accessible names of bespoke select toolbar buttons including `align`, `fontfamily`, `fontsize`, `blocks`, and `styles` were incorrectly translated. #TINY-10426 #TINY-10435 +- Clicking inside table cells with heavily nested content could cause the browser to hang. #TINY-10380 +- Toggling a list that contains an LI element having another list as its first child would remove the remaining content within that LI element. #TINY-10414 + +## 6.8.1 - 2023-11-29 + +### Improved +- Colorpicker now includes the Brightness/Saturation selector and hue slider in the keyboard navigable items. #TINY-9287 + +### Fixed +- Translation syntax for announcement text in the table grid was incorrectly formatted. #TINY-10141 +- The functions `schema.isWrapper` and `schema.isInline` did not exclude node names that started with `#` which should not be considered as elements. #TINY-10385 + +## 6.8.0 - 2023-11-22 + +### Added +- CSS files are now also generated as separate JS files to improve bundling of all resources. #TINY-10352 +- Added new `StylesheetLoader.loadRawCss` API that can be used to load CSS into a style element. #TINY-10352 +- Added new `StylesheetLoader.unloadRawCss` API that can be used to unload CSS that was loaded into a style element. #TINY-10352 +- Added `force_hex_color` editor option. Option `'always'` converts all RGB & RGBA colours to hex, `'rgb_only'` will only convert RGB and *not* RGBA colours to hex, `'off'` won't convert any colours to hex. #TINY-9819 +- Added `default_font_stack` editor option that makes it possible to define what is considered a system font stack. #TINY-10290 +- New `sandbox_iframes` option that controls whether iframe elements will be added a `sandbox=""` attribute to mitigate malicious intent. #TINY-10348 +- New `convert_unsafe_embeds` option that controls whether `` and `` elements will be converted to more restrictive alternatives, namely `` for image MIME types, `