Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This package is a thin wrapper around [TinyMCE](https://github.com/tinymce/tinym

|Angular version|`tinymce-angular` version|
|--- |--- |
|16+ |8+ |
|>=16.x <=19.x |8+ |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The max version should be v20.x here to reflect your changes in the devDependencies, no?

|14+ |7.x |
|13+ |6.x |
|9+ |4.x |
Expand Down
49 changes: 26 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,31 @@
},
"private": true,
"devDependencies": {
"@angular-devkit/build-angular": "^18.1.1",
"@angular-devkit/core": "^18.1.1",
"@angular/animations": "^18.1.1",
"@angular/cdk": "^18.1.1",
"@angular/cli": "^18.1.1",
"@angular/common": "^18.1.1",
"@angular/compiler": "^18.1.1",
"@angular/compiler-cli": "^18.1.1",
"@angular/core": "^18.1.1",
"@angular/forms": "^18.1.1",
"@angular/language-service": "^18.1.1",
"@angular/material": "^18.1.1",
"@angular/platform-browser": "^18.1.1",
"@angular/platform-browser-dynamic": "^18.1.1",
"@angular-devkit/build-angular": "^20",
"@angular-devkit/core": "^19",
"@angular/animations": "^20",
"@angular/cdk": "^19",
"@angular/cli": "^20",
"@angular/common": "^20",
"@angular/compiler": "^20",
"@angular/compiler-cli": "^20",
"@angular/core": "^20",
"@angular/forms": "^20",
"@angular/language-service": "^19",
"@angular/material": "^19",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why not all devDeps are v20?

"@angular/platform-browser": "^20",
"@angular/platform-browser-dynamic": "^20",
"@babel/core": "^7.24.9",
"@ephox/agar": "^8.0.1",
"@ephox/bedrock-client": "^14.1.1",
"@ephox/bedrock-server": "^14.1.3",
"@ephox/sugar": "^9.3.1",
"@storybook/addon-essentials": "^8.2.5",
"@storybook/addon-interactions": "^8.2.5",
"@storybook/addon-essentials": "9.0.0-alpha.12",
"@storybook/addon-interactions": "^9.0.0-alpha.10",
"@storybook/addon-links": "^8.2.5",
"@storybook/angular": "^8.2.5",
"@storybook/blocks": "^8.2.5",
"@storybook/test": "^8.2.5",
"@storybook/angular": "^9",
"@storybook/blocks": "^9.0.0-alpha.17",
"@storybook/test": "^9.0.0-alpha.2",
"@tinymce/beehive-flow": "^0.19.0",
"@tinymce/eslint-plugin": "^3.0.0",
"@tinymce/miniature": "^6.0.0",
Expand All @@ -61,7 +61,7 @@
"regenerator-runtime": "^0.14.1",
"rimraf": "^6.0.1",
"rxjs": "^7.8.1",
"storybook": "^8.2.5",
"storybook": "^9",
"tinymce": "^8.0.0",
"tinymce-4": "npm:tinymce@^4",
"tinymce-5": "npm:tinymce@^5",
Expand All @@ -71,10 +71,13 @@
"tinymce-8": "npm:tinymce@^8",
"to-string-loader": "^1.1.5",
"tslib": "^2.6.2",
"typescript": "~5.5.4",
"typescript": "^5.9.3",
"webpack": "^5.95.0",
"zone.js": "~0.14.8"
"zone.js": "~0.15.0"
},
"version": "9.1.2-rc",
"name": "@tinymce/tinymce-angular"
"name": "@tinymce/tinymce-angular",
"dependencies": {
"@angular/router": "^20"
}
}
5 changes: 3 additions & 2 deletions stories/Editor.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import { ViewQueryComponent } from './viewquery/Viewquery.component';
import { MaterialTabs } from './materialtabs/MaterialTabs.component';
import { SafePipe } from './pipes/Safe.pipe';
import { MatTabsModule } from '@angular/material/tabs';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ContainerComponent, ContentProjectionComponent } from './contentprojection/ContentProjection.component';
import { BindingComponent } from './data-binding/DataBinding.component';
import { ReadonlyComponent } from './readonly/Readonly.component';
import { BrowserModule } from '@angular/platform-browser';

const meta: Meta = {
component: EditorComponent,
Expand Down Expand Up @@ -168,7 +168,7 @@ export const MaterialTabsStory: StoryObj<EditorComponent> = {
name: 'Material Tabs',
render: () => ({
moduleMetadata: {
imports: [ ReactiveFormsModule, FormsModule, BrowserAnimationsModule, MatTabsModule ],
imports: [ ReactiveFormsModule, FormsModule, BrowserModule, MatTabsModule ],
declarations: [ MaterialTabs ],
},
template: `<material-tabs/>`
Expand All @@ -180,6 +180,7 @@ export const ContentProjectionStory: StoryObj<EditorComponent> = {
render: () => ({
moduleMetadata: {
declarations: [ ContentProjectionComponent, ContainerComponent ],
imports: [ FormsModule ],
},
template: `<content-projection/>`
}),
Expand Down
6 changes: 4 additions & 2 deletions stories/contentprojection/ContentProjection.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ import { apiKey } from '../Settings';
<button [innerText]="show ? 'Hide' : 'Show'" (click)="handleToggle()"></button>
<ng-container *ngTemplateOutlet="show ? editorTemplate : placeHolder"></ng-container>
<div>
`
`,
standalone: false
})
export class ContainerComponent {
@Input() public editorTemplate!: TemplateRef<any>;
Expand All @@ -52,7 +53,8 @@ export class ContainerComponent {
</ng-template>
<container [editorTemplate]="editorTemplate"></container>
`
`,
standalone: false
})
export class ContentProjectionComponent {
public apiKey = apiKey;
Expand Down
3 changes: 2 additions & 1 deletion stories/data-binding/DataBinding.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { apiKey, modelEvents, sampleContent } from '../Settings';

@Component({
selector: 'binding',
templateUrl: './DataBinding.component.html'
templateUrl: './DataBinding.component.html',
standalone: false
})
export class BindingComponent {
public isEditingContent = true;
Expand Down
1 change: 1 addition & 0 deletions stories/disable/Disable.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { apiKey, sampleContent } from '../Settings';
@Component({
selector: 'disabling',
templateUrl: './Disabling.component.html',
standalone: false
})
export class DisablingComponent {
public isDisabled = false;
Expand Down
1 change: 1 addition & 0 deletions stories/event-binding/EventBinding.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { apiKey } from '../Settings';
@Component({
selector: 'event-binding',
templateUrl: './EventBinding.component.html',
standalone: false
})
export class EventBindingComponent {
public apiKey = apiKey;
Expand Down
1 change: 1 addition & 0 deletions stories/event-forwarding/EventForwarding.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { apiKey } from '../Settings';
@Component({
selector: 'event-forwarding',
templateUrl: './EventForwarding.component.html',
standalone: false
})
export class EventForwardingComponent {
public apiKey = apiKey;
Expand Down
1 change: 1 addition & 0 deletions stories/form-control/FormControl.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { apiKey } from 'stories/Settings';
@Component({
selector: 'form-control',
templateUrl: './FormControl.component.html',
standalone: false,
})
export class FormControlComponent {
public apiKey = apiKey;
Expand Down
1 change: 1 addition & 0 deletions stories/form-with-on-push/form-with-on-push.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { apiKey } from 'stories/Settings';
selector: 'form-with-on-push',
templateUrl: './form-with-on-push.html',
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false
})
export class FormWithOnPushComponent {
@Input() public apiKey = apiKey;
Expand Down
3 changes: 2 additions & 1 deletion stories/formvalidation/FormValidation.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import { apiKey } from '../Settings';
.preview {
border: 1px solid rgb(190, 190, 190);
}
` ]
` ],
standalone: false
})
export class BlogComponent {
public submitted = false;
Expand Down
3 changes: 2 additions & 1 deletion stories/materialtabs/MaterialTabs.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { apiKey } from '../Settings';

@Component({
selector: 'material-tabs',
templateUrl: './MaterialTabs.component.html'
templateUrl: './MaterialTabs.component.html',
standalone: false
})
export class MaterialTabs implements AfterViewInit {
@ViewChild('tabGroup', { static: false }) public tabGroup: any;
Expand Down
3 changes: 2 additions & 1 deletion stories/pipes/Safe.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { Pipe, PipeTransform } from '@angular/core';
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';

@Pipe({
name: 'safe'
name: 'safe',
standalone: false
})
export class SafePipe implements PipeTransform {

Expand Down
1 change: 1 addition & 0 deletions stories/readonly/Readonly.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { apiKey, sampleContent } from '../Settings';
@Component({
selector: 'readonly',
templateUrl: './Readonly.component.html',
standalone: false
})
export class ReadonlyComponent {
public isReadonly = false;
Expand Down
3 changes: 2 additions & 1 deletion stories/viewquery/Viewquery.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { apiKey } from '../Settings';

@Component({
selector: 'view-query',
templateUrl: './Viewquery.component.html'
templateUrl: './Viewquery.component.html',
standalone: false
})
export class ViewQueryComponent {
@ViewChild(EditorComponent, { static: true }) public editorComponent!: EditorComponent;
Expand Down
12 changes: 11 additions & 1 deletion tinymce-angular-component/src/test/ts/alien/TestHooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,17 @@ export const editorHook = <T = unknown>(component: Type<T>, moduleDef: TestModul
if (editor.initialized) {
resolve(editor);
}
editor.once( 'SkinLoaded', () => resolve(editor));
editor.once('SkinLoaded', () => {
// This is a workaround to avoid a race condition occurring in tinymce 8 where licenseKeyManager is still validating the license key
// after global tinymce is removed in a clean up. Specifically, it happens when unloading/loading different versions of TinyMCE
if (editor.licenseKeyManager) {
editor.licenseKeyManager.validate({}).then(() => {
resolve(editor);
}).catch((reason) => console.warn(reason));
} else {
resolve(editor);
}
});
})
),
map(
Expand Down
Loading
Loading