Prevent cross-contamination of SimpleMDE auto-saves
This commit is contained in:
parent
80860a264e
commit
1be3db1453
|
@ -1,7 +1,12 @@
|
||||||
|
/**
|
||||||
|
* Provide SimpleMDE support for textareas on this page. TODO: this is
|
||||||
|
* slightly problematic since it assumes (and saves autosave data for)
|
||||||
|
* only one text area on the page. Perhaps we should disable autosave?
|
||||||
|
*/
|
||||||
var simplemde = new SimpleMDE({
|
var simplemde = new SimpleMDE({
|
||||||
autosave: {
|
autosave: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
uniqueId: "adl-generated-{{page}}",
|
uniqueId: "{{page}}-{{record.id}}",
|
||||||
delay: 1000,
|
delay: 1000,
|
||||||
},
|
},
|
||||||
indentWithTabs: true,
|
indentWithTabs: true,
|
||||||
|
|
|
@ -635,7 +635,8 @@
|
||||||
(child-with-tag
|
(child-with-tag
|
||||||
form :field
|
form :field
|
||||||
#(= "text-area" (widget-type (property-for-field % entity) application)))
|
#(= "text-area" (widget-type (property-for-field % entity) application)))
|
||||||
(embed-script-fragment "resources/js/text-area-md-support.js"))))))}})
|
(embed-script-fragment "resources/js/text-area-md-support.js"
|
||||||
|
[["{{page}}" (-> form :attrs :name)]]))))))}})
|
||||||
|
|
||||||
|
|
||||||
(defn form-to-template
|
(defn form-to-template
|
||||||
|
|
Loading…
Reference in a new issue