You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to restrict an element's/dropzone's children to an element of a certain name/type?
i.e.,
<accordiondata-fred-name="accordion"data-fred-restrict="accordion_item">
{# only accordion items are allowed here #}
</accordion>
Along with that, is there a way to either, include another element inside the markup of an element, or have FRED recognize markup within an element as a particular element?
Also, is there a way to import an option in an incomplete option set multiple times with unique names, instead of having to create many options with the same settings? Even just a chunk of sorts would be helpful.
The same question popped up for me when i was playing around with nested drop zones.
One idea that came to mind was to use a data-fred-dropitems attribute with the JS events to fiddle with the content but somehow this messes up the saved content (maybe has internal state?)
<script>
document.body.addEventListener("FredElementDrop", function(evt){constfredEl=evt.detail.fredEl;console.log('FredElementDrop received',fredEl);letallowedDropItems=fredEl.dropzone.el.dataset.fredDropitems;if(allowedDropItems){console.log('Allowed DropItems',allowedDropItems);allowedDropItems=allowedDropItems.split(',');if(allowedDropItems.length>0&&!allowedDropItems.includes(fredEl.title)){console.log(`Element [${fredEl.title}] not allowed in this dropzone`,fredEl);fredEl.wrapper.remove();}}});</script>
Is it possible to restrict an element's/dropzone's children to an element of a certain name/type?
i.e.,
Along with that, is there a way to either, include another element inside the markup of an element, or have FRED recognize markup within an element as a particular element?
Also, is there a way to import an option in an incomplete option set multiple times with unique names, instead of having to create many options with the same settings? Even just a chunk of sorts would be helpful.
i.e.,
imported as
The text was updated successfully, but these errors were encountered: