Skip to content

Commit 13b9ddb

Browse files
Added getting started sample for Javascript Word Processor.
1 parent f8ef745 commit 13b9ddb

File tree

13 files changed

+248
-2
lines changed

13 files changed

+248
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
src/**/*.js
2+
!src/system.config.js
3+
node_modules/

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
# ej2-javascript-word-processor
2-
Getting started with Syncfusion JavaScript Word Processor - https://www.syncfusion.com/javascript-ui-controls/js-word-processor
1+
# Syncfusion JavaScript Word Processor
2+
Getting started sample of Syncfusion JavaScript Word Processor
3+
Feature Tour - https://www.syncfusion.com/javascript-ui-controls/js-word-processor
4+
Demos - https://ej2.syncfusion.com/demos/#/material/document-editor/default
5+
Documentation - https://ej2.syncfusion.com/documentation/introduction/
6+
KB - https://www.syncfusion.com/kb/essential-js2/documenteditor

e2e/index.spec.js

Whitespace-only changes.

e2e/protractor.conf.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
exports.config = {
2+
3+
allScriptsTimeout: 11000,
4+
5+
capabilities: {
6+
'browserName': 'chrome'
7+
},
8+
9+
framework: 'jasmine',
10+
11+
jasmineNodeOpts: {
12+
defaultTimeoutInterval: 10000
13+
},
14+
15+
onPrepare: function() {
16+
browser.waitForAngularEnabled(false);
17+
},
18+
19+
specs: ['./*.spec.js']
20+
};

gulpfile.js

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
'use strict';
2+
3+
var gulp = require('gulp');
4+
5+
/**
6+
* Load the sample in src/app/index
7+
*/
8+
gulp.task('start', ['compile'], function(done) {
9+
var browserSync = require('browser-sync');
10+
var bs = browserSync.create('Essential JS 2');
11+
var options = {
12+
server: {
13+
baseDir: ['./src', './']
14+
},
15+
ui: false
16+
};
17+
bs.init(options, done);
18+
19+
/**
20+
* Watching typescript file changes
21+
*/
22+
gulp.watch('src/**/*.ts', ['compile', bs.reload]).on('change', reportChanges);
23+
});
24+
25+
/**
26+
* Compile TypeScript to JS
27+
*/
28+
gulp.task('compile', function(done) {
29+
var ts = require('gulp-typescript');
30+
// Default typescript config
31+
var defaultConfig = {
32+
typescript: require('typescript')
33+
};
34+
var tsProject, tsResult;
35+
// Create the typescript project
36+
tsProject = ts.createProject('tsconfig.json', defaultConfig);
37+
// Get typescript result
38+
tsResult = gulp.src(['./src/**/*.ts'], { base: '.' })
39+
.pipe(ts(tsProject))
40+
.pipe(gulp.dest('./'))
41+
.on('error', function(e) {
42+
done(e);
43+
process.exit(1);
44+
}).on('end', function() {
45+
done();
46+
});
47+
});
48+
49+
function reportChanges(event) {
50+
console.log('File ' + event.path + ' was ' + event.type + ', running tasks...');
51+
}
52+
/**
53+
* Testing spec files
54+
*/
55+
var protractor = require('gulp-protractor').protractor;
56+
var webdriver_standalone = require('gulp-protractor').webdriver_standalone;
57+
var webdriver_update = require('gulp-protractor').webdriver_update_specific;
58+
59+
gulp.task('e2e-serve', webdriver_standalone);
60+
61+
gulp.task('e2e-webdriver-update', webdriver_update({
62+
webdriverManagerArgs: ['--ie', '--edge']
63+
}));
64+
65+
gulp.task('e2e-test', ['compile'], function(done) {
66+
var browserSync = require('browser-sync');
67+
var bs = browserSync.create('Essential JS 2');
68+
var options = {
69+
server: {
70+
baseDir: [
71+
'./src/app/',
72+
'./src/resource/',
73+
'./node_modules/@syncfusion/ej2/'
74+
],
75+
directory: true
76+
},
77+
ui: false,
78+
open: false,
79+
notify: false
80+
};
81+
bs.init(options, function() {
82+
gulp.src(['./spec/**/*.spec.js'])
83+
.pipe(protractor({
84+
configFile: 'e2e/protractor.conf.js'
85+
}))
86+
.on('error', function(e) {
87+
console.error('Error: ' + e.message);
88+
done();
89+
process.exit(1);
90+
})
91+
.on('end', function() {
92+
done();
93+
process.exit(0);
94+
});
95+
});
96+
});

license

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Essential JS 2 library is available under the Syncfusion Essential Studio program, and can be licensed either under the Syncfusion Community License Program or the Syncfusion commercial license.
2+
3+
To be qualified for the Syncfusion Community License Program you must have a gross revenue of less than one (1) million U.S. dollars ($1,000,000.00 USD) per year and have less than five (5) developers in your organization, and agree to be bound by Syncfusion’s terms and conditions.
4+
5+
Customers who do not qualify for the community license can contact sales@syncfusion.com for commercial licensing options.
6+
7+
Under no circumstances can you use this product without (1) either a Community License or a commercial license and (2) without agreeing and abiding by Syncfusion’s license containing all terms and conditions.
8+
9+
The Syncfusion license that contains the terms and conditions can be found at
10+
https://www.syncfusion.com/content/downloads/syncfusion_license.pdf

package.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "ej2-quickstart",
3+
"version": "0.0.1",
4+
"description": "Essential JS 2 typescript quick start application",
5+
"author": "Syncfusion Inc.",
6+
"license": "SEE LICENSE IN license",
7+
"repository": {
8+
"type": "git",
9+
"url": "https://github.com/syncfusion/ej2-quickstart.git"
10+
},
11+
"dependencies": {
12+
"@syncfusion/ej2": "*"
13+
},
14+
"devDependencies": {
15+
"browser-sync": "^2.18.12",
16+
"gulp": "^3.9.1",
17+
"gulp-protractor": "^4.1.0",
18+
"gulp-typescript": "^2.13.0",
19+
"jasmine": "^2.6.0",
20+
"systemjs": "^0.20.14",
21+
"typescript": "2.3.4"
22+
},
23+
"scripts": {
24+
"start": "gulp start",
25+
"serve": "gulp e2e-serve",
26+
"test": "gulp e2e-test",
27+
"update-webdriver": "gulp e2e-webdriver-update"
28+
}
29+
}

src/app/app.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { DocumentEditorContainer,Toolbar } from '@syncfusion/ej2-documenteditor';
2+
3+
DocumentEditorContainer.Inject(Toolbar);
4+
let documenteditor: DocumentEditorContainer = new DocumentEditorContainer();
5+
documenteditor.appendTo('#DocumentEditor');

src/index.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>Essential JS 2 - Document Editor</title>
5+
<meta charset="utf-8" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
7+
<meta name="description" content="Essential JS 2" />
8+
<meta name="author" content="Syncfusion" />
9+
<link rel="shortcut icon" href="resources/favicon.ico" />
10+
11+
<!--style reference from app-->
12+
<link href="/styles/styles.css" rel="stylesheet" />
13+
14+
<!--system js reference and configuration-->
15+
<script src="node_modules/systemjs/dist/system.src.js" type="text/javascript"></script>
16+
<script src="system.config.js" type="text/javascript"></script>
17+
</head>
18+
19+
<body>
20+
<!--Element which will render as DocumentEditor -->
21+
<div id="DocumentEditor" style="height: 700px;"></div>
22+
</body>
23+
</html>

src/resources/favicon.ico

6.42 KB
Binary file not shown.

0 commit comments

Comments
 (0)