Skip to content

Commit d5350ca

Browse files
released version 1.2.0
Release version 1.2.0 : Fallback Modal, bug fixes, support for v5, build improvements, added context and menu bar button.
2 parents d90eb90 + 956e227 commit d5350ca

File tree

225 files changed

+1063
-128530
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

225 files changed

+1063
-128530
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
storybook-static
22
node_modules
3-
.vscode
3+
.vscode
4+
public/tinymce

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Supercode TinyMCE Plugin
22

3-
**Supercode** is an enhanced source code editor plugin for TinyMCE, the popular web-based WYSIWYG editor. This plugin provides users with a seamless experience for editing and displaying source code within the TinyMCE editor environment. (No ugly popup modal)
3+
**Supercode** is an enhanced source code editor plugin for TinyMCE, the popular web-based WYSIWYG editor. This plugin provides users with a seamless experience for editing and displaying source code within the TinyMCE editor environment. Supported on tinyMCE versions `v5`, `v6` and `v7`.
44

55
![chrome-capture-2024-4-7 (1)](https://github.com/prathamVaidya/supercode-tinymce-plugin/assets/61202986/eb519154-ac86-423a-8d63-450f174c7e4b)
66

@@ -38,6 +38,13 @@ To use the Supercode plugin in TinyMCE, simply:
3838
3. Make changes to your code as needed, utilizing the features provided by Supercode.
3939
4. Click again on the Supercode Toggle button or press escape or use Ctrl+Space shortcut to switch back to visual editing.
4040

41+
## Using Modal Dialog box
42+
43+
Supercode uses [Custom View](https://www.tiny.cloud/docs/tinymce/latest/custom-view/) to view source code in tinymce editor itself. This Custom View is not supported on older version `<=v5` and in `inline` mode. A modal dialog is used as a fallback in case `Custom Views` is not available or `fallbackModal` is set to `true`.
44+
45+
This modal can be customized using following modal related options like `fallbackModal`, `modalPrimaryColor`, `modalSecondaryColor`, `dark`.
46+
47+
![chrome-capture-2024-4-19 (1)](https://github.com/prathamVaidya/supercode-tinymce-plugin/assets/61202986/3f8cc702-442a-4eb9-8a91-e3db5c640229)
4148

4249
## Using as a Markdown Editor
4350

@@ -109,6 +116,11 @@ Here are all the configurations
109116
| `shortcut` | Specifies whether (Ctrl+Space) keyboard shortcuts are enabled. | Boolean |
110117
| `aceCss` | The custom CSS or CSS fonts to customize the appearance of the code editor. | String |
111118
| `fontFamily` | The font family applied to the code editor. | String |
119+
| `fallbackModal` | Set it to true to explicitly use code editor in modal dialog. Defaults to automatic detection. | String |
120+
| `modalPrimaryColor` | Modal Primary color if using custom tinymce skin editor. | String |
121+
| `modalSecondaryColor` | Modal Secondary color if using custom tinymce skin editor. | String |
122+
| `dark` | Set `true` if your modal primary color is dark to add matching border editor. | String |
123+
| `debug` | Set `false` to disable debug warnings. Default `false` editor. | String |
112124

113125
# Editor Themes
114126

@@ -163,7 +175,7 @@ All the ace themes are supported. You can try out the themes [here](https://ace.
163175

164176
## Compatibility
165177

166-
Supercode is compatible with the latest versions of TinyMCE and supports all the themes. I have only tested it on v7 till now. Create an issue if it has or has not worked for your tinymce version. As per my knowledge it should work with all the tinyMCE versions after v5.
178+
Supercode is compatible with the latest versions of TinyMCE and supports all the themes. It has been tested on `v5`, `v6` and `v7` of tinyMCE. In `v5` the in-editor integration is not supported so a fallback modal is always used. It is not tested on older versions that are less than `v5`. If you have tested on any older versions then please create an issue and let us know.
167179

168180
## Todos
169181

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "supercode-tinymce-plugin",
3-
"version": "1.0.2",
4-
"description": "Opensource and Powerful Source Code editor for TinyMCE. Also enables more than just HTML editing enabling Markdown Editing or any source code editing.",
3+
"version": "1.2.0",
4+
"description": "An Enhanced and open source Code editor for TinyMCE with improved integration with TinyMCE view",
55
"main": "index.js",
66
"scripts": {
77
"build": "cp src/* supercode/ -r && vite build",
@@ -22,12 +22,13 @@
2222
"@storybook/react-vite": "^8.0.5",
2323
"@storybook/test": "^8.0.5",
2424
"prop-types": "^15.8.1",
25-
"rollup-plugin-copy": "^3.5.0",
25+
"rollup-plugin-terser": "^7.0.2",
2626
"storybook": "^8.0.5",
2727
"vite": "^5.2.7"
2828
},
2929
"dependencies": {
30-
"@tinymce/tinymce-react": "^5.0.0",
30+
"@rollup/plugin-terser": "^0.4.4",
31+
"@tinymce/tinymce-react": "^5.0.1",
3132
"markdown-it": "^14.1.0",
3233
"tinymce": "^7.0.0",
3334
"turndown": "^7.1.3"

public/.keep

Whitespace-only changes.

0 commit comments

Comments
 (0)