Skip to content

Cannot open links in current browser tab #9553

@danielekbom

Description

@danielekbom

What is the current behavior?
Links with the option "Open link in..." set to "Current window" opens in a new browser tab.

Please provide the steps to reproduce
In the editor when clicking "Insert" -> "Link..." a modal for adding a link pops up.
Here is an option "Open link in..." where you can select "Current window".
Insert a link with that option set to "Current window".
Save the editor (put it in readonly inline mode, see the options i use after clicking save in the getEditorOptions function below).
Click the link.

What is the expected behavior?
Links with the option "Open link in..." set to "Current window" should open in the same window.

Setup/Config
Angular 14
tinymce-angular 7.0.0

import { EditorComponent, EditorModule } from '@tinymce/tinymce-angular';
import { EditorOptions } from 'tinymce';

getEditorOptions(): Partial<EditorOptions> {
  return {
          base_url: '/tinymce',
          suffix: '.min',
          visual: false,
	  max_height: this.noMaxHeight ? 0 : 400,
	  min_height: 0,
	  content_style: this.getContentStyle(RichTextComponent.CONTENT_STYLE),
	  readonly: true,
	  promotion: false,
	  branding: false,
	  menubar: false,
	  toolbar: false,
	  statusbar: false,
	  resize: false,
	  inline: true,
  };
}
	<editor
		#editor
		*ngIf="!dragging"
		[id]="id"
		[(ngModel)]="value"
		(ngModelChange)="emitValue()"
		[init]="getEditorOptions()"
		(onInit)="onInit()"
		[class.loading]="loading"
		[disabled]="readonly"
	></editor>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions