Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
src/**/*.js
!src/system.config.js
node_modules/
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# ej2-javascript-word-processor
Getting started with Syncfusion JavaScript Word Processor - https://www.syncfusion.com/javascript-ui-controls/js-word-processor
# Syncfusion JavaScript Word Processor
Getting started sample of Syncfusion JavaScript Word Processor
Feature Tour - https://www.syncfusion.com/javascript-ui-controls/js-word-processor
Demos - https://ej2.syncfusion.com/demos/#/material/document-editor/default
Documentation - https://ej2.syncfusion.com/documentation/introduction/
KB - https://www.syncfusion.com/kb/essential-js2/documenteditor
Empty file added e2e/index.spec.js
Empty file.
20 changes: 20 additions & 0 deletions e2e/protractor.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
exports.config = {

allScriptsTimeout: 11000,

capabilities: {
'browserName': 'chrome'
},

framework: 'jasmine',

jasmineNodeOpts: {
defaultTimeoutInterval: 10000
},

onPrepare: function() {
browser.waitForAngularEnabled(false);
},

specs: ['./*.spec.js']
};
96 changes: 96 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
'use strict';

var gulp = require('gulp');

/**
* Load the sample in src/app/index
*/
gulp.task('start', ['compile'], function(done) {
var browserSync = require('browser-sync');
var bs = browserSync.create('Essential JS 2');
var options = {
server: {
baseDir: ['./src', './']
},
ui: false
};
bs.init(options, done);

/**
* Watching typescript file changes
*/
gulp.watch('src/**/*.ts', ['compile', bs.reload]).on('change', reportChanges);
});

/**
* Compile TypeScript to JS
*/
gulp.task('compile', function(done) {
var ts = require('gulp-typescript');
// Default typescript config
var defaultConfig = {
typescript: require('typescript')
};
var tsProject, tsResult;
// Create the typescript project
tsProject = ts.createProject('tsconfig.json', defaultConfig);
// Get typescript result
tsResult = gulp.src(['./src/**/*.ts'], { base: '.' })
.pipe(ts(tsProject))
.pipe(gulp.dest('./'))
.on('error', function(e) {
done(e);
process.exit(1);
}).on('end', function() {
done();
});
});

function reportChanges(event) {
console.log('File ' + event.path + ' was ' + event.type + ', running tasks...');
}
/**
* Testing spec files
*/
var protractor = require('gulp-protractor').protractor;
var webdriver_standalone = require('gulp-protractor').webdriver_standalone;
var webdriver_update = require('gulp-protractor').webdriver_update_specific;

gulp.task('e2e-serve', webdriver_standalone);

gulp.task('e2e-webdriver-update', webdriver_update({
webdriverManagerArgs: ['--ie', '--edge']
}));

gulp.task('e2e-test', ['compile'], function(done) {
var browserSync = require('browser-sync');
var bs = browserSync.create('Essential JS 2');
var options = {
server: {
baseDir: [
'./src/app/',
'./src/resource/',
'./node_modules/@syncfusion/ej2/'
],
directory: true
},
ui: false,
open: false,
notify: false
};
bs.init(options, function() {
gulp.src(['./spec/**/*.spec.js'])
.pipe(protractor({
configFile: 'e2e/protractor.conf.js'
}))
.on('error', function(e) {
console.error('Error: ' + e.message);
done();
process.exit(1);
})
.on('end', function() {
done();
process.exit(0);
});
});
});
10 changes: 10 additions & 0 deletions license
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
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.

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.

Customers who do not qualify for the community license can contact sales@syncfusion.com for commercial licensing options.

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.

The Syncfusion license that contains the terms and conditions can be found at
https://www.syncfusion.com/content/downloads/syncfusion_license.pdf
29 changes: 29 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "ej2-quickstart",
"version": "0.0.1",
"description": "Essential JS 2 typescript quick start application",
"author": "Syncfusion Inc.",
"license": "SEE LICENSE IN license",
"repository": {
"type": "git",
"url": "https://github.com/syncfusion/ej2-quickstart.git"
},
"dependencies": {
"@syncfusion/ej2": "*"
},
"devDependencies": {
"browser-sync": "^2.18.12",
"gulp": "^3.9.1",
"gulp-protractor": "^4.1.0",
"gulp-typescript": "^2.13.0",
"jasmine": "^2.6.0",
"systemjs": "^0.20.14",
"typescript": "2.3.4"
},
"scripts": {
"start": "gulp start",
"serve": "gulp e2e-serve",
"test": "gulp e2e-test",
"update-webdriver": "gulp e2e-webdriver-update"
}
}
5 changes: 5 additions & 0 deletions src/app/app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { DocumentEditorContainer,Toolbar } from '@syncfusion/ej2-documenteditor';

DocumentEditorContainer.Inject(Toolbar);
let documenteditor: DocumentEditorContainer = new DocumentEditorContainer();
documenteditor.appendTo('#DocumentEditor');
23 changes: 23 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Essential JS 2 - Document Editor</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<meta name="description" content="Essential JS 2" />
<meta name="author" content="Syncfusion" />
<link rel="shortcut icon" href="resources/favicon.ico" />

<!--style reference from app-->
<link href="/styles/styles.css" rel="stylesheet" />

<!--system js reference and configuration-->
<script src="node_modules/systemjs/dist/system.src.js" type="text/javascript"></script>
<script src="system.config.js" type="text/javascript"></script>
</head>

<body>
<!--Element which will render as DocumentEditor -->
<div id="DocumentEditor" style="height: 700px;"></div>
</body>
</html>
Binary file added src/resources/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions src/styles/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import '../../node_modules/@syncfusion/ej2/material.css';
32 changes: 32 additions & 0 deletions src/system.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
System.config({
paths: {
'syncfusion:': './node_modules/@syncfusion/',
},
map: {
app: 'app',

//Syncfusion packages mapping
"@syncfusion/ej2-base": "syncfusion:ej2-base/dist/ej2-base.umd.min.js",
"@syncfusion/ej2-file-utils": "syncfusion:ej2-file-utils/dist/ej2-file-utils.umd.min.js",
"@syncfusion/ej2-compression": "syncfusion:ej2-compression/dist/ej2-compression.umd.min.js",
"@syncfusion/ej2-buttons": "syncfusion:ej2-buttons/dist/ej2-buttons.umd.min.js",
"@syncfusion/ej2-popups": "syncfusion:ej2-popups/dist/ej2-popups.umd.min.js",
"@syncfusion/ej2-navigations": "syncfusion:ej2-navigations/dist/ej2-navigations.umd.min.js",
"@syncfusion/ej2-inputs": "syncfusion:ej2-inputs/dist/ej2-inputs.umd.min.js",
"@syncfusion/ej2-splitbuttons": "syncfusion:ej2-splitbuttons/dist/ej2-splitbuttons.umd.min.js",
"@syncfusion/ej2-dropdowns": "syncfusion:ej2-dropdowns/dist/ej2-dropdowns.umd.min.js",
"@syncfusion/ej2-lists": "syncfusion:ej2-lists/dist/ej2-lists.umd.min.js",
"@syncfusion/ej2-data": "syncfusion:ej2-data/dist/ej2-data.umd.min.js",
"@syncfusion/ej2-office-chart": "syncfusion:ej2-office-chart/dist/ej2-office-chart.umd.min.js",
"@syncfusion/ej2-calendars": "syncfusion:ej2-calendars/dist/ej2-calendars.umd.min.js",
"@syncfusion/ej2-charts": "syncfusion:ej2-charts/dist/ej2-charts.umd.min.js",
"@syncfusion/ej2-svg-base": "syncfusion:ej2-svg-base/dist/ej2-svg-base.umd.min.js",
"@syncfusion/ej2-pdf-export": "syncfusion:ej2-pdf-export/dist/ej2-pdf-export.umd.min.js",
"@syncfusion/ej2-documenteditor": "syncfusion:ej2-documenteditor/dist/ej2-documenteditor.umd.min.js"
},
packages: {
'app': { main: 'app', defaultExtension: 'js' }
}
});

System.import('app');
23 changes: 23 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"target": "es5",
"module": "amd",
"removeComments": true,
"noLib": false,
"sourceMap": true,
"pretty": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true,
"allowJs": false,
"noEmitOnError": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node",
"suppressImplicitAnyIndexErrors": true,
"lib": ["es6", "dom"]
},
"compileOnSave": false
}