SkawaMarkdownEditorComponent class

Markdown editor Component

Properties:

  • value: String -- value of the editor
  • displayMode: EditorMode -- current mode the editor is in

Methods:

  • cancelEdit() -- revert all changes and exit edit mode
  • previewMarkdown() -- render source and enter preview mode
  • editMarkdown() -- enter edit mode

Events:

  • (update): String -- if contents of the editor is changed, this is emitted

Example:

<skawa-markdown-editor value="Some initial value">
  <div class="placeholder">What to display if value is empty</div>
</skawa-markdown-editor>
Inheritance
Implemented types
Annotations
  • @Component(selector: 'skawa-markdown-editor', templateUrl: 'markdown_editor.html', styleUrls: ['markdown_editor.css'], directives: [AutoFocusDirective, EditorRenderSource, EditorRenderTarget, LanguageDirectionDirective, NgClass], changeDetection: ChangeDetectionStrategy.OnPush)

Constructors

SkawaMarkdownEditorComponent(ViewContainerRef containerRef, ChangeDetectorRef changeDetectorRef)

Properties

changeDetectorRef ChangeDetectorRef
final
containerRef ViewContainerRef
final
disabled bool
read / writeinherited
displayMode String
Gets the mode in which the editor is in
read / writeinherited
displayPlaceholder bool
read-only
hashCode int
The hash code for this object.
read-onlyinherited
initialValue String
read / write
isDisplaying bool
read-only
isEditing bool
read-only
mode String
read-only
ngClasses Map<String, bool>
read-only
onMode Stream<String>
read-only
onUpdated Stream<String>
Event emitted when value changes
read-onlyoverride
placeholderTemplate TemplateRef
read / write
renderSource EditorRenderSource
read / write
renderTarget EditorRenderTarget
read / writeoverride
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
value String
Gets the updated value of the editor
read / writeoverride

Methods

cancelEdit() → void
editMarkdown() → void
ngAfterViewInit() → void
override
ngOnDestroy() → void
Executed before the directive is removed from the DOM and destroyed.
override
ngOnInit() → void
Executed after the first change detection run for a directive.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
previewMarkdown() → void
revertAllChanges() → void
Reverts all edits, restores state to when the component was created
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited