mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-09-22 05:50:48 +02:00
fix(tinymce): set absolute path for skin url (#5491)
This commit is contained in:
parent
ede1b074f0
commit
90125abf92
1 changed files with 6 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
import { Component, OnDestroy, AfterViewInit, Output, EventEmitter, ElementRef } from '@angular/core';
|
||||
import { LocationStrategy } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-tiny-mce',
|
||||
|
@ -10,13 +11,16 @@ export class TinyMCEComponent implements OnDestroy, AfterViewInit {
|
|||
|
||||
editor: any;
|
||||
|
||||
constructor(private host: ElementRef) { }
|
||||
constructor(
|
||||
private host: ElementRef,
|
||||
private locationStrategy: LocationStrategy,
|
||||
) { }
|
||||
|
||||
ngAfterViewInit() {
|
||||
tinymce.init({
|
||||
target: this.host.nativeElement,
|
||||
plugins: ['link', 'paste', 'table'],
|
||||
skin_url: 'assets/skins/lightgray',
|
||||
skin_url: `${this.locationStrategy.getBaseHref()}assets/skins/lightgray`,
|
||||
setup: editor => {
|
||||
this.editor = editor;
|
||||
editor.on('keyup', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue