Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F87472519
editor-comment.component.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Oct 12, 21:18
Size
2 KB
Mime Type
text/x-java
Expires
Mon, Oct 14, 21:18 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
21602258
Attached To
rNIETZSCHEBETAAPP Nietzsche-Beta-App
editor-comment.component.ts
View Options
import { Component, Input, OnInit } from '@angular/core';
import { MarkupSettings, StandoffMarkup } from 'ngx-mat-standoff-markup';
import { EditorComment } from '../models';
import { WordWithLine } from '../datatypes/word';
import { DataHandler } from '../data_handler';
import { TlnCacheQueryService } from '../services';
import { TlnEditorCommentMarkup } from '../datatypes/positional-markup';
@Component({
selector: 'editor-comment',
templateUrl: './editor-comment.component.html',
styleUrls: ['./editor-comment.component.css']
})
export class EditorCommentComponent implements OnInit {
@Input() editor_comment: EditorComment;
editorType: string;
dataHandler: DataHandler = new DataHandler(this);
markups: StandoffMarkup[] = [];
word: WordWithLine;
mySettings: MarkupSettings = new MarkupSettings();
constructor(private tlnQueryService: TlnCacheQueryService) { }
ngOnInit() {
if (this.editor_comment != undefined && this.editor_comment != null && this.editor_comment.editorClass != null && this.editor_comment.editorClass.split('#').length > 1){
this.dataHandler.setQueryService(this.tlnQueryService);
if (this.editor_comment.editorClass.split('#')[1] != 'EditorComment'){
this.editorType = this.editor_comment.editorClass.split('#')[1];
}
/*if (this.editor_comment.word != undefined && this.editor_comment.word != null){
this.dataHandler.addHandler('word', { 'handler': WordWithLine});
this.dataHandler.getData('word', this.editor_comment.word);
}*/
if (this.editor_comment.textWithMarkup != undefined && this.editor_comment.textWithMarkup != null){
this.dataHandler.addHandler('markups', { 'handler': TlnEditorCommentMarkup });
this.tlnQueryService.reset_data.subscribe(
(data_key: string) =>{
if (data_key == 'page_content'){
this.markups = [];
}
});
this.dataHandler.getData('markups', this.editor_comment.textWithMarkup);
}
}
}
}
Event Timeline
Log In to Comment