Improve support of the User guide Editor for the new User Guide htmls

This commit is contained in:
George Kalampokis 2020-12-30 18:08:10 +02:00
parent 8bc3783847
commit cf47898007
2 changed files with 9 additions and 4 deletions

View File

@ -11,13 +11,18 @@
menubar: true,
plugins: [
'advlist autolink lists link image charmap print preview anchor',
'searchreplace visualblocks code fullscreen fullpage',
'insertdatetime media table paste code help wordcount importcss'
'searchreplace visualblocks fullscreen fullpage',
'insertdatetime media table paste code help wordcount importcss ',
'codesample toc visualchars'
],
extended_valid_elements: '*[*]',
forced_root_block: '',
valid_children: '+body[script],ol[li|div|p|a|ol|table],h2[span],h3[span]',
save_enablewhendirty: false,
toolbar:
'undo redo | formatselect | bold italic backcolor | \
alignleft aligncenter alignright alignjustify | \
bullist numlist outdent indent | code | preview | removeformat | help'
bullist numlist outdent indent | code codesample | searchreplace | preview | removeformat | help'
}" formControlName="html"></editor>
</mat-card-content>
</mat-card>

View File

@ -67,7 +67,7 @@ export class UserGuideEditorComponent extends BaseComponent implements OnInit {
reader.addEventListener('load', () => {
let result = this.parseText(reader.result as string);
result = result.replace(/class="href" path="/g, 'href="#');
this.formGroup.get('html').patchValue(result);
this.formGroup.get('html').patchValue(result);
}, false);
reader.readAsText(data);
}