mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
13 lines
348 B
JavaScript
13 lines
348 B
JavaScript
import { Controller } from "stimulus";
|
|
|
|
export default class extends Controller {
|
|
connect() {
|
|
window.addEventListener("trix-change", this.#trixChange);
|
|
}
|
|
|
|
#trixChange = (event) => {
|
|
// trigger a change event on the form that contains the Trix editor
|
|
event.target.form.dispatchEvent(new Event("change", { bubbles: true }));
|
|
};
|
|
}
|