@fluxfiles/tinymce 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -9
- package/package.json +12 -4
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# FluxFiles — TinyMCE Plugin
|
|
2
2
|
|
|
3
|
-
Adds a **FluxFiles** toolbar button to TinyMCE 4
|
|
3
|
+
Adds a **FluxFiles** toolbar button to TinyMCE 4 to 8 for browsing and inserting files.
|
|
4
4
|
|
|
5
5
|
## Requirements
|
|
6
6
|
|
|
7
|
-
- TinyMCE 4.
|
|
8
|
-
- A running **FluxFiles core** server (the PHP backend / standalone app in `packages/core`). This plugin is only the editor button
|
|
7
|
+
- TinyMCE 4, 5, 6, 7 or 8. Self-hosted TinyMCE 7 and later also needs `license_key: 'gpl'` (or your commercial key) in `tinymce.init`; that is a TinyMCE requirement, not a FluxFiles one.
|
|
8
|
+
- A running **FluxFiles core** server (the PHP backend / standalone app in `packages/core`). This plugin is only the editor button: your page must load the FluxFiles SDK (`fluxfiles.js`, served by that server at `/fluxfiles.js`) before TinyMCE initialises, and `fluxfiles_endpoint` must point at that server.
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
@@ -20,7 +20,7 @@ the plugin folder into your TinyMCE `plugins/` directory:
|
|
|
20
20
|
```
|
|
21
21
|
tinymce/plugins/fluxfiles/
|
|
22
22
|
├── plugin.js # readable source
|
|
23
|
-
├── plugin.min.js # minified (~
|
|
23
|
+
├── plugin.min.js # minified (~5.4 KB) — use in production
|
|
24
24
|
└── README.md
|
|
25
25
|
```
|
|
26
26
|
|
|
@@ -34,8 +34,8 @@ resolve to it); regenerate with `npm run build` (esbuild).
|
|
|
34
34
|
```js
|
|
35
35
|
tinymce.init({
|
|
36
36
|
selector: '#editor',
|
|
37
|
-
plugins: 'fluxfiles',
|
|
38
|
-
toolbar: 'undo redo |
|
|
37
|
+
plugins: 'fluxfiles link image',
|
|
38
|
+
toolbar: 'undo redo | bold italic | fluxfiles | link image',
|
|
39
39
|
fluxfiles_endpoint: 'https://your-fluxfiles-host',
|
|
40
40
|
fluxfiles_token: 'JWT_TOKEN',
|
|
41
41
|
fluxfiles_disk: 'local',
|
|
@@ -80,6 +80,9 @@ The modal closes automatically after selection.
|
|
|
80
80
|
| `fluxfiles_theme` | string | `null` | Picker theme: `light` / `dark` / `auto` |
|
|
81
81
|
| `fluxfiles_multiple` | boolean | `false` | Allow multi-file selection |
|
|
82
82
|
| `fluxfiles_allowed_types` | string[] | `null` | Extensions (`.pdf` or `pdf`) or MIME types / patterns (`image/*`, `application/pdf`). Shown only in picker mode: non-matching files are hidden and cannot be selected. UI convenience, not a security boundary (the token's `allowed_ext` claim is the server-side check) |
|
|
83
|
+
| `fluxfiles_path` | string | `null` | Folder the picker opens in |
|
|
84
|
+
| `fluxfiles_max_upload_mb` | number | `null` | Max size per uploaded file, MB |
|
|
85
|
+
| `fluxfiles_max_files` | number | `null` | Max files per upload batch |
|
|
83
86
|
| `fluxfiles_image_dialog` | boolean | `true` | Wire `file_picker_callback` into the native image/link/media dialogs |
|
|
84
87
|
|
|
85
88
|
**Files with no permanent URL.** Two cases:
|
|
@@ -91,9 +94,11 @@ Only `http(s)` URLs are ever inserted.
|
|
|
91
94
|
|
|
92
95
|
## Compatibility
|
|
93
96
|
|
|
94
|
-
- **TinyMCE 4
|
|
95
|
-
- **TinyMCE 5
|
|
96
|
-
-
|
|
97
|
+
- **TinyMCE 4** — uses the `addButton` / `addMenuItem` API.
|
|
98
|
+
- **TinyMCE 5, 6, 7, 8** — use the `ui.registry.addButton` / `ui.registry.addMenuItem` API.
|
|
99
|
+
- The version is detected when the plugin loads.
|
|
100
|
+
|
|
101
|
+
Checked in a real browser on 2026-11-20 against FluxFiles core 1.6.3 with TinyMCE 6.8.6, 7.9.3 and 8.10.2: the toolbar button opens the picker and inserts the image with `alt`, `width` and `height`, and the browse icon in TinyMCE's own *Insert/edit image* dialog fills Source, Alt, Width and Height.
|
|
97
102
|
|
|
98
103
|
## License
|
|
99
104
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluxfiles/tinymce",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "TinyMCE plugin for FluxFiles",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "plugin.js",
|
|
@@ -16,8 +16,14 @@
|
|
|
16
16
|
"build": "esbuild plugin.js --minify --legal-comments=none --outfile=plugin.min.js",
|
|
17
17
|
"test": "vitest run"
|
|
18
18
|
},
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"esbuild": "^0.28.0",
|
|
21
|
+
"jsdom": "^25.0.1",
|
|
22
|
+
"vitest": "^4.1.12"
|
|
23
|
+
},
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
21
27
|
"author": "thai-pc",
|
|
22
28
|
"homepage": "https://github.com/thai-pc/fluxfiles#framework-adapters",
|
|
23
29
|
"repository": {
|
|
@@ -25,7 +31,9 @@
|
|
|
25
31
|
"url": "git+https://github.com/thai-pc/fluxfiles.git",
|
|
26
32
|
"directory": "packages/tinymce"
|
|
27
33
|
},
|
|
28
|
-
"bugs": {
|
|
34
|
+
"bugs": {
|
|
35
|
+
"url": "https://github.com/thai-pc/fluxfiles/issues"
|
|
36
|
+
},
|
|
29
37
|
"keywords": [
|
|
30
38
|
"fluxfiles",
|
|
31
39
|
"file-manager",
|