Skip to content

Commit be16de2

Browse files
committed
chore: add kendo-react-editor-material-ui app
1 parent 09e6e39 commit be16de2

File tree

18 files changed

+598
-0
lines changed

18 files changed

+598
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
**/kendo-ui-license**
21+
22+
npm-debug.log*
23+
yarn-debug.log*
24+
yarn-error.log*
25+
26+
# package-lock file
27+
package-lock.json
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Telerik
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# kendo-react-editor-material-ui
2+
An example of KendoReact Editor used with Material UI components
3+
4+
To run the project:
5+
6+
1. npm install
7+
1. npm start
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "kendo-react-editor-with-material-ui",
3+
"version": "0.1.0",
4+
"private": true,
5+
"dependencies": {
6+
"react": "^16.8.4",
7+
"react-dom": "^16.8.4",
8+
"@material-ui/core": "^3.9.3",
9+
"@material-ui/icons": "^3.0.2",
10+
11+
"@progress/kendo-react-intl": "^2.11.0",
12+
"@progress/kendo-react-popup": "^2.11.0",
13+
"@progress/kendo-react-editor": "^2.11.0",
14+
"@progress/kendo-react-buttons": "^2.11.0",
15+
"@progress/kendo-react-dialogs": "^2.11.0",
16+
"@progress/kendo-react-dropdowns": "^2.11.0",
17+
18+
"prosemirror-commands": "^1.0.7",
19+
"prosemirror-dropcursor": "^1.0.1",
20+
"prosemirror-gapcursor": "^1.0.2",
21+
"prosemirror-history": "^1.0.2",
22+
"prosemirror-keymap": "^1.0.1",
23+
"prosemirror-model": "^1.6.1",
24+
"prosemirror-state": "^1.2.2",
25+
"prosemirror-view": "^1.5.2"
26+
},
27+
"devDependencies": {
28+
"react-scripts": "2.1.8"
29+
},
30+
"scripts": {
31+
"start": "react-scripts start",
32+
"build": "react-scripts build",
33+
"test": "react-scripts test",
34+
"eject": "react-scripts eject"
35+
},
36+
"eslintConfig": {
37+
"extends": "react-app"
38+
},
39+
"browserslist": [
40+
">0.2%",
41+
"not dead",
42+
"not ie <= 11",
43+
"not op_mini all"
44+
]
45+
}
3.78 KB
Binary file not shown.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
6+
<meta
7+
name="viewport"
8+
content="width=device-width, initial-scale=1, shrink-to-fit=no"
9+
/>
10+
<meta name="theme-color" content="#000000" />
11+
<!--
12+
manifest.json provides metadata used when your web app is installed on a
13+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
14+
-->
15+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
16+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500">
17+
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
18+
<!--
19+
Notice the use of %PUBLIC_URL% in the tags above.
20+
It will be replaced with the URL of the `public` folder during the build.
21+
Only files inside the `public` folder can be referenced from the HTML.
22+
23+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24+
work correctly both with client-side routing and a non-root public URL.
25+
Learn how to configure a non-root public URL by running `npm run build`.
26+
-->
27+
<title>React App</title>
28+
</head>
29+
<body>
30+
<noscript>You need to enable JavaScript to run this app.</noscript>
31+
<div id="root"></div>
32+
<!--
33+
This HTML file is a template.
34+
If you open it directly in the browser, you will see an empty page.
35+
36+
You can add webfonts, meta tags, or analytics to this file.
37+
The build step will place the bundled scripts into the <body> tag.
38+
39+
To begin the development, run `npm start` or `yarn start`.
40+
To create a production bundle, use `npm run build` or `yarn build`.
41+
-->
42+
</body>
43+
</html>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"short_name": "React App",
3+
"name": "Create React App Sample",
4+
"icons": [
5+
{
6+
"src": "favicon.ico",
7+
"sizes": "64x64 32x32 24x24 16x16",
8+
"type": "image/x-icon"
9+
}
10+
],
11+
"start_url": ".",
12+
"display": "standalone",
13+
"theme_color": "#000000",
14+
"background_color": "#ffffff"
15+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.editor-content {
2+
box-sizing: border-box;
3+
overflow-Y: scroll;
4+
padding: 0 4px;
5+
height: 300px;
6+
border: 1px solid rgba(0,0,0,0.12);
7+
outline: 0;
8+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import React from 'react';
2+
import './App.css';
3+
4+
import { EditorTools } from '@progress/kendo-react-editor';
5+
6+
import CustomEditor from '../src/components/CustomEditor';
7+
import ViewHtml from '../src/components/CustomViewHtml';
8+
import { customToolRendering } from '../src/components/CustomRenderingTool';
9+
10+
const Bold = customToolRendering(EditorTools.Bold);
11+
const Italic = customToolRendering(EditorTools.Italic);
12+
const Underline = customToolRendering(EditorTools.Underline);
13+
const Undo = customToolRendering(EditorTools.Undo);
14+
const Redo = customToolRendering(EditorTools.Redo);
15+
16+
export default class App extends React.Component {
17+
render() {
18+
return (
19+
<CustomEditor
20+
defaultContent="Hello world"
21+
tools={[Bold, Italic, Underline, Undo, Redo, ViewHtml]}
22+
/>
23+
);
24+
}
25+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from 'react';
2+
import ReactDOM from 'react-dom';
3+
import App from './App';
4+
5+
it('renders without crashing', () => {
6+
const div = document.createElement('div');
7+
ReactDOM.render(<App />, div);
8+
ReactDOM.unmountComponentAtNode(div);
9+
});

0 commit comments

Comments
 (0)