Skip to content

Commit 64b1605

Browse files
authored
Add files via upload
Angular 4 files has been moved
1 parent 3695ff7 commit 64b1605

25 files changed

+621
-2
lines changed

HTML-rich-text-editor.png

49.1 KB
Loading

README.md

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,41 @@
1-
# ej2-angular-4-rich-text-editor
2-
A quick start project that helps you to create an Angular 4 Rich Text Editor with minimal code configuration
1+
# Syncfusion Angular 4 WYSIWYG Rich Text Editor Quick Start Project
2+
3+
A quick start project that helps you to create the Syncfusion Angular 4 Rich Text Editor with minimal code configuration.
4+
5+
![Angular 4 Rich Text Editor](HTML-rich-text-editor.png)
6+
7+
## Rich Text Editor features covered in this Project
8+
9+
This is an Angular 4 project created using [Angular CLI](https://github.com/angular/angular-cli) 1.4.10. The Rich Text Editor features included in this project are as follows.
10+
* Angular 4 Rich Text Editor render in HTML editor view.
11+
* Configured the toolbar items for editing and formatting the content.
12+
* Setting the editor value on initial rendering.
13+
* Getting the editor value on button submit action.
14+
15+
## Project pre-requisites
16+
Make sure that you have the compatible versions of TypeScript and Angular in your machine before starting to work on this project.
17+
* Angular 4+
18+
* TypeScript 2.6+
19+
20+
## How to run this application?
21+
To run this application, you need to first clone the `ej2-angular-4-rich-text-editor` repository and then navigate to its appropriate path where it has been located in your system.
22+
23+
To do so, open the command prompt and run the below commands one after the other.
24+
25+
```
26+
git clone https://github.com/SyncfusionSamples/ej2-angular-4-rich-text-editor.git
27+
cd ej2-angular-4-rich-text-editor
28+
```
29+
30+
## Installing
31+
Once done with downloading, next you need to install the necessary packages required to run this application locally. The `npm install` command will install all the needed angular packages into your current project and to do so, run the below command.
32+
33+
```
34+
npm install
35+
```
36+
## Running on development server
37+
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
38+
39+
## Further help
40+
41+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

e2e/app.e2e-spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { AppPage } from './app.po';
2+
3+
describe('ej2-angular4-richtexteditor App', () => {
4+
let page: AppPage;
5+
6+
beforeEach(() => {
7+
page = new AppPage();
8+
});
9+
10+
it('should display welcome message', () => {
11+
page.navigateTo();
12+
expect(page.getParagraphText()).toEqual('Welcome to app!');
13+
});
14+
});

e2e/app.po.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { browser, by, element } from 'protractor';
2+
3+
export class AppPage {
4+
navigateTo() {
5+
return browser.get('/');
6+
}
7+
8+
getParagraphText() {
9+
return element(by.css('app-root h1')).getText();
10+
}
11+
}

e2e/tsconfig.e2e.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../out-tsc/e2e",
5+
"baseUrl": "./",
6+
"module": "commonjs",
7+
"target": "es5",
8+
"types": [
9+
"jasmine",
10+
"jasminewd2",
11+
"node"
12+
]
13+
}
14+
}

karma.conf.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Karma configuration file, see link for more information
2+
// https://karma-runner.github.io/1.0/config/configuration-file.html
3+
4+
module.exports = function (config) {
5+
config.set({
6+
basePath: '',
7+
frameworks: ['jasmine', '@angular/cli'],
8+
plugins: [
9+
require('karma-jasmine'),
10+
require('karma-chrome-launcher'),
11+
require('karma-jasmine-html-reporter'),
12+
require('karma-coverage-istanbul-reporter'),
13+
require('@angular/cli/plugins/karma')
14+
],
15+
client:{
16+
clearContext: false // leave Jasmine Spec Runner output visible in browser
17+
},
18+
coverageIstanbulReporter: {
19+
reports: [ 'html', 'lcovonly' ],
20+
fixWebpackSourcePaths: true
21+
},
22+
angularCli: {
23+
environment: 'dev'
24+
},
25+
reporters: ['progress', 'kjhtml'],
26+
port: 9876,
27+
colors: true,
28+
logLevel: config.LOG_INFO,
29+
autoWatch: true,
30+
browsers: ['Chrome'],
31+
singleRun: false
32+
});
33+
};

package.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"name": "ej2-angular4-richtexteditor",
3+
"version": "0.0.0",
4+
"license": "MIT",
5+
"scripts": {
6+
"ng": "ng",
7+
"start": "ng serve",
8+
"build": "ng build",
9+
"test": "ng test",
10+
"lint": "ng lint",
11+
"e2e": "ng e2e"
12+
},
13+
"private": true,
14+
"dependencies": {
15+
"@angular/animations": "^4.2.4",
16+
"@angular/common": "^4.2.4",
17+
"@angular/compiler": "^4.2.4",
18+
"@angular/core": "^4.2.4",
19+
"@angular/forms": "^4.2.4",
20+
"@angular/http": "^4.2.4",
21+
"@angular/platform-browser": "^4.2.4",
22+
"@angular/platform-browser-dynamic": "^4.2.4",
23+
"@angular/router": "^4.2.4",
24+
"@syncfusion/ej2-angular-richtexteditor": "^16.3.34",
25+
"core-js": "^2.4.1",
26+
"rxjs": "^5.4.2",
27+
"zone.js": "^0.8.14"
28+
},
29+
"devDependencies": {
30+
"@angular/cli": "1.4.10",
31+
"@angular/compiler-cli": "^4.2.4",
32+
"@angular/language-service": "^4.2.4",
33+
"@types/jasmine": "~2.5.53",
34+
"@types/jasminewd2": "~2.0.2",
35+
"@types/node": "~6.0.60",
36+
"codelyzer": "~3.2.0",
37+
"jasmine-core": "~2.6.2",
38+
"jasmine-spec-reporter": "~4.1.0",
39+
"karma": "~1.7.0",
40+
"karma-chrome-launcher": "~2.1.1",
41+
"karma-cli": "~1.0.1",
42+
"karma-coverage-istanbul-reporter": "^1.2.1",
43+
"karma-jasmine": "~1.1.0",
44+
"karma-jasmine-html-reporter": "^0.2.2",
45+
"protractor": "~5.1.2",
46+
"ts-node": "~3.2.0",
47+
"tslint": "~5.7.0",
48+
"typescript": "^2.9.2"
49+
}
50+
}

protractor.conf.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Protractor configuration file, see link for more information
2+
// https://github.com/angular/protractor/blob/master/lib/config.ts
3+
4+
const { SpecReporter } = require('jasmine-spec-reporter');
5+
6+
exports.config = {
7+
allScriptsTimeout: 11000,
8+
specs: [
9+
'./e2e/**/*.e2e-spec.ts'
10+
],
11+
capabilities: {
12+
'browserName': 'chrome'
13+
},
14+
directConnect: true,
15+
baseUrl: 'http://localhost:4200/',
16+
framework: 'jasmine',
17+
jasmineNodeOpts: {
18+
showColors: true,
19+
defaultTimeoutInterval: 30000,
20+
print: function() {}
21+
},
22+
onPrepare() {
23+
require('ts-node').register({
24+
project: 'e2e/tsconfig.e2e.json'
25+
});
26+
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
27+
}
28+
};

src/app/app.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<ejs-richtexteditor id='defaultRTE' [(value)]='value' [toolbarSettings]='tools' [quickToolbarSettings]='quickTools'></ejs-richtexteditor>

src/app/app.component.spec.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { TestBed, async } from '@angular/core/testing';
2+
import { AppComponent } from './app.component';
3+
describe('AppComponent', () => {
4+
beforeEach(async(() => {
5+
TestBed.configureTestingModule({
6+
declarations: [
7+
AppComponent
8+
],
9+
}).compileComponents();
10+
}));
11+
it('should create the app', async(() => {
12+
const fixture = TestBed.createComponent(AppComponent);
13+
const app = fixture.debugElement.componentInstance;
14+
expect(app).toBeTruthy();
15+
}));
16+
it(`should have as title 'app'`, async(() => {
17+
const fixture = TestBed.createComponent(AppComponent);
18+
const app = fixture.debugElement.componentInstance;
19+
expect(app.title).toEqual('app');
20+
}));
21+
it('should render title in a h1 tag', async(() => {
22+
const fixture = TestBed.createComponent(AppComponent);
23+
fixture.detectChanges();
24+
const compiled = fixture.debugElement.nativeElement;
25+
expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!');
26+
}));
27+
});

0 commit comments

Comments
 (0)