Skip to content

Commit

Permalink
feat: add width property to editor (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
sibiraj-s authored Oct 3, 2017
1 parent 28bfb99 commit 731f2fc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/ngx-editor/ngx-editor.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="ngx-editor" id="ngxEditor">
<div class="ngx-editor" id="ngxEditor" [style.width]="config['width']" [style.minWidth]="config['minWidth']">
<div class="toolbar">
<div class="set">
<button *ngIf="canEnableToolbarOptions('bold')" (click)="executeCommand('bold')" title="Bold"><i class="fa fa-bold" aria-hidden="true"></i></button>
Expand Down
2 changes: 2 additions & 0 deletions src/app/ngx-editor/ngx-editor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export class NgxEditorComponent implements OnInit {
@Input() translate: string;
@Input() height: string;
@Input() minHeight: string;
@Input() width: string;
@Input() minWidth: string;
@Input() toolbar: any;

/*
Expand Down
2 changes: 2 additions & 0 deletions src/app/ngx-editor/ngx-editor.defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ export const ngxEditorConfig = {
spellcheck: true,
height: 'auto',
minHeight: '0',
width: 'auto',
minWidth: '0',
translate: 'yes',
placeholder: 'Enter text here...',
toolbar: [
Expand Down

0 comments on commit 731f2fc

Please sign in to comment.