Skip to content

Commit

Permalink
1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
yabab-dev committed May 12, 2016
1 parent 4f2ae41 commit 1684c76
Show file tree
Hide file tree
Showing 7 changed files with 121 additions and 10 deletions.
4 changes: 2 additions & 2 deletions CKEditor.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ export declare class CKEditor implements ControlValueAccessor {

constructor(elementRef:ElementRef, ngControl:NgControl);
ckeditorInit(config:any):void;
hackUpdate():void;
onValueChange(event:any);

// ControlValueAccessor
writeValue(value:any):void;
onChange(_:any):void;
registerOnChange(fn:Function):void;
registerOnTouched(fn:Function):void;

}
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ export class Sample{

### <a name="config"></a>Configuration

* config : The configuration object for CKEditor see http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-fileTools_defaultFileName
* configFile : You can use a javacsript file to configure your CKEditor (Only work with SystemJS)
* config : The configuration object for CKEditor see http://docs.ckeditor.com/#!/api/CKEDITOR.config

* ***[Deprecated : use file loader with your bundler]*** configFile : You can use a javacsript file to configure your CKEditor (Only work with SystemJS)
```javascript
export var config = {
uiColor: '#990000'
Expand Down
7 changes: 3 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ var cache = require('gulp-cached');

var paths = {
dest: 'lib/',
sources: 'src/**/*.es6',
assets: 'src/**/!(*.es6)',
sources: 'src/**/*.es6'
};

/**
Expand All @@ -17,7 +16,7 @@ gulp.task('default', ['watch']);
/**
* Build all
*/
gulp.task('build', ['babel', 'uglify']);
gulp.task('build', ['babel']);

/**
* Babel transpile all sources
Expand All @@ -39,5 +38,5 @@ gulp.task('babel', function(){
* Babel watch
*/
gulp.task('watch', function(){
return gulp.watch([paths.sources, paths.assets], ['babel']);
return gulp.watch([paths.sources], ['babel']);
});
56 changes: 56 additions & 0 deletions lib/CKEditor.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/CKEditor.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng2-ckeditor",
"version": "1.0.2",
"version": "1.0.3",
"description": "Angular2 CKEditor component",
"main": "lib/CKEditor.js",
"typings": "./CKEditor.d.ts",
Expand Down
55 changes: 55 additions & 0 deletions src/CKEditor.es6
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,58 @@ export class CKEditor {
registerOnChange(fn){this.onChange = fn;}
registerOnTouched(fn){this.onTouched = fn;}
}

/**
* CKEditor inline Directive
* @WIP
*/
// @Directive({
// selector: '[ckeditorInline]',
// })
// export class CKEditorInline{
//
// @Input('ckeditorInline') config;
//
// instance;
// el;
//
// /**
// * Constructor
// */
// constructor(el: ElementRef) {
// this.el = el;
// }
//
// /**
// * On component view init
// */
// ngAfterViewInit(){
// var config = this.config || {};
// //this.ckeditorInit( config );
// }
//
// /**
// * On component destroy
// */
// ngOnDestroy(){
// if( this.instance ) {
// this.instance.removeAllListeners();
// this.instance.destroy();
// this.instance = null;
// }
// }
//
// /**
// * CKEditor init
// */
// ckeditorInit( config ){
// if(!CKEDITOR){
// console.error('Please include CKEditor in your page');
// return;
// }
//
// CKEDITOR.disableAutoInline = true;
// this.instance = CKEDITOR.inline(this.el);
// }
//
// }

0 comments on commit 1684c76

Please sign in to comment.