Skip to content

Commit

Permalink
Fixed #803
Browse files Browse the repository at this point in the history
  • Loading branch information
Çağatay Çivici committed Aug 30, 2016
1 parent d92738e commit 2d9c5d4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/editor/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ export class Editor implements AfterViewInit,ControlValueAccessor {

@Input() readOnly: boolean;

@Input() formats: string[];

value: string;

onModelChange: Function = () => {};
Expand All @@ -100,7 +102,8 @@ export class Editor implements AfterViewInit,ControlValueAccessor {
},
placeholder: this.placeholder,
readOnly: this.readOnly,
theme: 'snow'
theme: 'snow',
formats: this.formats
});

if(this.value) {
Expand Down
19 changes: 19 additions & 0 deletions showcase/demo/editor/editordemo.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,25 @@ <h3>Attributes</h3>
<td>null</td>
<td>Style class of the container.</td>
</tr>
<tr>
<td>placeholder</td>
<td>string</td>
<td>null</td>
<td>Placeholder text to show when editor is empty.</td>
</tr>
<tr>
<td>readonly</td>
<td>boolean</td>
<td>false</td>
<td>Whether to instantiate the editor to read-only mode.</td>
</tr>
<tr>
<td>formats</td>
<td>string[]</td>
<td>null</td>
<td>Whitelist of formats to display, see <a href="http://quilljs.com/docs/formats/">here</a> for available options.</td>
</tr>

</tbody>
</table>
</div>
Expand Down

0 comments on commit 2d9c5d4

Please sign in to comment.