Sha256: 5f225cddd595373d1ff1ef0fb6aea5802903298c68fafaae0b61944e945fd474
Contents?: true
Size: 771 Bytes
Versions: 6
Compression:
Stored size: 771 Bytes
Contents
$(() => { window.DecidimAwesome = window.DecidimAwesome || {}; const token = $('meta[name="csrf-token"]').attr("content"); const $textarea = $("textarea#proposal_body"); const text = window.DecidimAwesome.texts.drag_and_drop_image; if (!$textarea.length) { return; } if (window.DecidimAwesome.allow_images_in_proposals) { // Add the capability to upload images only (they will be presented as links) $textarea.after(`<p class="help-text">${text}</p>`); $textarea.inlineattachment({ uploadUrl: window.DecidimAwesome.editor_uploader_path, uploadFieldName: "image", jsonFieldName: "url", progressText: "[Uploading file...]", urlText: "{filename}", extraHeaders: { "X-CSRF-Token": token } }); } });
Version data entries
6 entries across 6 versions & 1 rubygems