Custom Scripts
Custom Scripts attach JavaScript to a single Placeholder block without touching the theme. Manage them under Settings → Content → Custom Scripts (permission Manage custom placeholder scripts).
How it works
Add a Placeholder block, copy its id from the editor preview (e.g. b_x7k2m9) and create an active script with that Placeholder ID. On the frontend the plugin then appends a script tag after the placeholder:
<div class="rc-placeholder" data-rc-placeholder="b_x7k2m9">…</div>
<script src="/renick-content/script/b_x7k2m9.js?v=1783713775" defer></script>The script is cached for a week; ?v= changes on every save. If several active scripts share an id, the most recently updated wins. Empty scripts are skipped, and editor and layout previews never include scripts.
Writing scripts
document.addEventListener('DOMContentLoaded', function () {
var el = document.querySelector('[data-rc-placeholder="b_x7k2m9"]');
if (el) { el.innerHTML = '<strong>Hello from a custom script!</strong>'; }
});Generate with AI
With an AI provider configured, save the script once, describe it on the Generate with AI tab and click Generate with AI. The result is vanilla JavaScript scoped to the placeholder and loads into the Code tab. Nothing goes live until you review it and save.
Who changed what
Each script shows its creator and last editor, and every create or update is written to the application log.
Scripts are code
Scripts are served exactly as written, without filtering or sandboxing. Grant Manage custom placeholder scripts as carefully as theme access.