@radioactive-labs/plutonium 0.1.13 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/dist/js/plutonium.js
CHANGED
|
@@ -7436,7 +7436,7 @@
|
|
|
7436
7436
|
var easymde_controller_default = class extends Controller {
|
|
7437
7437
|
connect() {
|
|
7438
7438
|
console.log(`easymde connected: ${this.element}`);
|
|
7439
|
-
self.easyMDE = new EasyMDE(
|
|
7439
|
+
self.easyMDE = new EasyMDE(this.#buildOptions());
|
|
7440
7440
|
this.element.setAttribute("data-action", "turbo:morph-element->easymde#reconnect");
|
|
7441
7441
|
}
|
|
7442
7442
|
disconnect() {
|
|
@@ -7447,6 +7447,17 @@
|
|
|
7447
7447
|
this.disconnect();
|
|
7448
7448
|
this.connect();
|
|
7449
7449
|
}
|
|
7450
|
+
#buildOptions() {
|
|
7451
|
+
let options = { element: this.element };
|
|
7452
|
+
if (this.element.attributes.id.value) {
|
|
7453
|
+
options.autosave = {
|
|
7454
|
+
enabled: true,
|
|
7455
|
+
uniqueId: this.element.attributes.id.value,
|
|
7456
|
+
delay: 1e3
|
|
7457
|
+
};
|
|
7458
|
+
}
|
|
7459
|
+
return options;
|
|
7460
|
+
}
|
|
7450
7461
|
};
|
|
7451
7462
|
|
|
7452
7463
|
// src/js/controllers/slim_select_controller.js
|