I am having some issues using draggable with an inline widget. Whenever it is dragged, all of the widgets html from the template is stripped. I am not sure if this is expected functionality or somethign is going wrong. I have tried recreating the widget html in the upcast method but it is very buggy.
When upcast is called the returned element is <span data-cke-marker="1"> </span>
Upcast is called twice with this being the element both times.
Here is my widget template
editor.widgets.add('text', {
allowedContent: 'span(!text-interaction,!textid,!text-input,!delete-text);',
requiredContent: 'span(text-interaction,textid,text-input,delete-text);',
template:
'<span data-type="text-interaction" class="text-interaction" data-cke-survive=1>' +
'<span class="textid" data-id="0" data-cke-survive=1>ID:0</span>' +
'<span class="text-input" data-id="0" data-cke-survive=1>None</span>' +
'<span class="delete-text nts-icon-close2" title="Delete text interaction" data-cke-survive=1></span>' +
'</span>',
Any help would be appreciated.
Thanks,
Brian
Figured out the issue. I had
Figured out the issue. I had paste as plain text set to tru in the config and it was stripping the widgets html. Finally found in the plugin where it was calling the paste command to put the widget back in.