From 93ac729ac55ac6e3b40d73a0000e3bf40c6af4fe Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Thu, 11 Jan 2024 18:00:38 +0100 Subject: [PATCH] Fix Tinymce language config It has been renamed from `locale` to `language` in v6. --- app/javascript/alchemy_admin/components/tinymce.js | 2 +- spec/javascript/alchemy_admin/components/tinymce.spec.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/javascript/alchemy_admin/components/tinymce.js b/app/javascript/alchemy_admin/components/tinymce.js index 3c54fb938e..c2dbc0fd1d 100644 --- a/app/javascript/alchemy_admin/components/tinymce.js +++ b/app/javascript/alchemy_admin/components/tinymce.js @@ -103,7 +103,7 @@ class Tinymce extends AlchemyHTMLElement { return { ...Alchemy.TinymceDefaults, ...customConfig, - locale: currentLocale(), + language: currentLocale(), selector: `#${this.editorId}` } } diff --git a/spec/javascript/alchemy_admin/components/tinymce.spec.js b/spec/javascript/alchemy_admin/components/tinymce.spec.js index 807ef400a9..3bf153ebe2 100644 --- a/spec/javascript/alchemy_admin/components/tinymce.spec.js +++ b/spec/javascript/alchemy_admin/components/tinymce.spec.js @@ -59,8 +59,8 @@ describe("alchemy-tinymce", () => { expect(component.configuration).toBeInstanceOf(Object) }) - it("should have the locale", () => { - expect(component.configuration.locale).toEqual("en") + it("should have the language", () => { + expect(component.configuration.language).toEqual("en") }) it("should add the attributes to configuration and cast dashes with underscores", () => {