Hi, So I’m very new to Elixir and Phoenix not even sure if this is possible but wanted to know how this can be done if it can be done.
I have my main index HTML or admin HTML which has the following at the bottom
<script type="text/javascript">
$(function() {
var editor = editormd("editormd", {
path : "/js/admin/",
readOnly:false,
});
});
</script>
I then have the following inside my loaded template/view
<div id="editormd">
<%= label f, :content, class: "control-label" %>
<%= textarea f, :content, class: "" %>
<%= error_tag f, :content %>
</div>
I’m using the editormd across different views and I need a way to set read-only var to true or false depending on the template
Maybe something like
<div id="editormd" readonly="true">
then
var editor = editormd("editormd", {
path : "/js/admin/",
readOnly:myvar,
});
Would pick that up and set the correct setting, it would need to reload as well?