Skip to content

Commit

Permalink
New version 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
xdan committed May 6, 2024
1 parent 0e57ca1 commit 4685ab9
Show file tree
Hide file tree
Showing 11 changed files with 7,961 additions and 363 deletions.
31 changes: 21 additions & 10 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginReactConfig from "eslint-plugin-react/configs/recommended.js";

import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';
import pluginReactConfig from 'eslint-plugin-react/configs/recommended.js';

export default [
{languageOptions: { globals: globals.browser }},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
pluginReactConfig,
];
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
{
...pluginReactConfig,
settings: {
react: {
version: 'detect'
}
}
},
{
rules: {
'@typescript-eslint/no-var-requires': 'off'
}
}
];
2 changes: 2 additions & 0 deletions examples/decorators/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
## Jodit example decorators

This example demonstrates how to use decorators to add custom functionality to the Jodit editor.
3 changes: 2 additions & 1 deletion examples/decorators/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"typescript": "^5.4.5",
"webpack": "^5.91.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.4"
"webpack-dev-server": "^5.0.4",
"html-webpack-plugin": "^5.6.0"
},
"dependencies": {
"react": "^18.3.1",
Expand Down
2 changes: 2 additions & 0 deletions examples/hide-finders-edit-buttons/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
## Jodit example hide-finders-edit-buttons

This example demonstrates how to hide the finders and edit buttons in the Jodit editor.
3 changes: 2 additions & 1 deletion examples/hide-finders-edit-buttons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"typescript": "^5.4.5",
"webpack": "^5.91.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.4"
"webpack-dev-server": "^5.0.4",
"html-webpack-plugin": "^5.6.0"
},
"dependencies": {
"react": "^18.3.1",
Expand Down
4 changes: 3 additions & 1 deletion examples/hide-finders-edit-buttons/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import React from 'react';
import { createRoot } from 'react-dom/client';
import JoditEditor, { Jodit } from 'jodit-pro-react';
import JoditEditor, { Jodit } from 'jodit-react';

import './index.css';

console.log(Jodit.version);

function App() {
const [value, setValue] = React.useState('Editor');

Expand Down
3 changes: 2 additions & 1 deletion examples/paste-link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"typescript": "^5.4.5",
"webpack": "^5.91.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.4"
"webpack-dev-server": "^5.0.4",
"html-webpack-plugin": "^5.6.0"
},
"dependencies": {
"react": "^18.3.1",
Expand Down
42 changes: 21 additions & 21 deletions examples/paste-link/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
const path = require("path");
const path = require('path');

const isProduction = process.env.NODE_ENV == "production";
const isProduction = process.env.NODE_ENV == 'production';

const stylesHandler = "style-loader";
const stylesHandler = 'style-loader';

const config = {
entry: "./src/index.tsx",
entry: './src/index.tsx',
output: {
clean: true,
publicPath: "/dist",
filename: "paste-link.js",
path: path.resolve(__dirname, "dist"),
publicPath: '/dist',
filename: 'paste-link.js',
path: path.resolve(__dirname, 'dist')
},
context: __dirname,
devServer: {
open: true,
allowedHosts: "all",
allowedHosts: 'all',
static: {
directory: path.resolve(__dirname, "./"),
directory: path.resolve(__dirname, './')
},
client: {
progress: true,
overlay: true,
overlay: true
},
hot: true,
hot: true
},
module: {
rules: [
{
test: /\.(ts|tsx)$/i,
loader: "ts-loader",
exclude: ["/node_modules/"],
loader: 'ts-loader',
exclude: ['/node_modules/']
},
{
test: /\.css$/i,
use: [stylesHandler, "css-loader"],
use: [stylesHandler, 'css-loader']
},
{
test: /\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i,
type: "asset",
},
],
type: 'asset'
}
]
},
resolve: {
extensions: [".tsx", ".ts", ".jsx", ".js", "..."],
},
extensions: ['.tsx', '.ts', '.jsx', '.js', '...']
}
};

module.exports = () => {
if (isProduction) {
config.mode = "production";
config.mode = 'production';
} else {
config.mode = "development";
config.mode = 'development';
}
return config;
};
Loading

0 comments on commit 4685ab9

Please sign in to comment.