Skip to content

Commit

Permalink
fix(tinymce): set absolute path for skin url (#5491)
Browse files Browse the repository at this point in the history
  • Loading branch information
yggg authored Aug 23, 2019
1 parent ede1b07 commit 90125ab
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/app/@theme/components/tiny-mce/tiny-mce.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component, OnDestroy, AfterViewInit, Output, EventEmitter, ElementRef } from '@angular/core';
import { LocationStrategy } from '@angular/common';

@Component({
selector: 'ngx-tiny-mce',
Expand All @@ -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', () => {
Expand Down

0 comments on commit 90125ab

Please sign in to comment.