Improve support of the User guide Editor for the new User Guide htmls
This commit is contained in:
parent
8bc3783847
commit
cf47898007
|
@ -11,13 +11,18 @@
|
||||||
menubar: true,
|
menubar: true,
|
||||||
plugins: [
|
plugins: [
|
||||||
'advlist autolink lists link image charmap print preview anchor',
|
'advlist autolink lists link image charmap print preview anchor',
|
||||||
'searchreplace visualblocks code fullscreen fullpage',
|
'searchreplace visualblocks fullscreen fullpage',
|
||||||
'insertdatetime media table paste code help wordcount importcss'
|
'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:
|
toolbar:
|
||||||
'undo redo | formatselect | bold italic backcolor | \
|
'undo redo | formatselect | bold italic backcolor | \
|
||||||
alignleft aligncenter alignright alignjustify | \
|
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>
|
}" formControlName="html"></editor>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|
|
@ -67,7 +67,7 @@ export class UserGuideEditorComponent extends BaseComponent implements OnInit {
|
||||||
reader.addEventListener('load', () => {
|
reader.addEventListener('load', () => {
|
||||||
let result = this.parseText(reader.result as string);
|
let result = this.parseText(reader.result as string);
|
||||||
result = result.replace(/class="href" path="/g, 'href="#');
|
result = result.replace(/class="href" path="/g, 'href="#');
|
||||||
this.formGroup.get('html').patchValue(result);
|
this.formGroup.get('html').patchValue(result);
|
||||||
}, false);
|
}, false);
|
||||||
reader.readAsText(data);
|
reader.readAsText(data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue