FullCalendar.js 外部元素拖动颜色和数据

FullCalendar.js External Element Dragging Color and Data

我有一个 FullCalendar.js(版本 5+)(www.FullCalendar.io) based application where I am trying to drag External Elements onto a Calendar. The Events on the Calendar contain some Events which are displayed using EventContent based 'injection'code. What I want to do is that when an External Element is dragged to the Calendar then not only it retains the Element's color but also doesn't show injected code. You can see my progress so far in this Pen: https://codepen.io/IrfanClemson/pen/YzWRxLN

请查看此屏幕截图以查看问题:

因此,当 'My Event 1' 被拖动时,只有 'My Event 1' 应该显示黄色,而不应该显示蓝色注入代码,例如 'ADDRESS HERE'.

有可能吗?

谢谢!

好的,明白了。部分解决方案反映在Pen的修改EventContent 属性中:https://codepen.io/IrfanClemson/pen/YzWRxLN

基本上,EventContent 确定拖动和动态添加的事件的内容。因此,如果拖动,则在 if/else 语句中捕获它,如上面链接的笔中所示。

抱歉,无法共享所有代码——太多了,但我认为这可能对某些人有所帮助!