Skip to content

Commit

Permalink
released version 1.2.0
Browse files Browse the repository at this point in the history
Release version 1.2.0 : Fallback Modal, bug fixes, support for v5, build improvements, added context and menu bar button.
  • Loading branch information
prathamVaidya authored Apr 19, 2024
2 parents d90eb90 + 956e227 commit d5350ca
Show file tree
Hide file tree
Showing 225 changed files with 1,063 additions and 128,530 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
storybook-static
node_modules
.vscode
.vscode
public/tinymce
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Supercode TinyMCE Plugin

**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)
**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`.

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

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

## Using Modal Dialog box

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`.

This modal can be customized using following modal related options like `fallbackModal`, `modalPrimaryColor`, `modalSecondaryColor`, `dark`.

![chrome-capture-2024-4-19 (1)](https://github.com/prathamVaidya/supercode-tinymce-plugin/assets/61202986/3f8cc702-442a-4eb9-8a91-e3db5c640229)

## Using as a Markdown Editor

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

# Editor Themes

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

## Compatibility

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.
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.

## Todos

Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "supercode-tinymce-plugin",
"version": "1.0.2",
"description": "Opensource and Powerful Source Code editor for TinyMCE. Also enables more than just HTML editing enabling Markdown Editing or any source code editing.",
"version": "1.2.0",
"description": "An Enhanced and open source Code editor for TinyMCE with improved integration with TinyMCE view",
"main": "index.js",
"scripts": {
"build": "cp src/* supercode/ -r && vite build",
Expand All @@ -22,12 +22,13 @@
"@storybook/react-vite": "^8.0.5",
"@storybook/test": "^8.0.5",
"prop-types": "^15.8.1",
"rollup-plugin-copy": "^3.5.0",
"rollup-plugin-terser": "^7.0.2",
"storybook": "^8.0.5",
"vite": "^5.2.7"
},
"dependencies": {
"@tinymce/tinymce-react": "^5.0.0",
"@rollup/plugin-terser": "^0.4.4",
"@tinymce/tinymce-react": "^5.0.1",
"markdown-it": "^14.1.0",
"tinymce": "^7.0.0",
"turndown": "^7.1.3"
Expand Down
Empty file added public/.keep
Empty file.
Loading

0 comments on commit d5350ca

Please sign in to comment.