Now that the image tag inserts correctly, the second part is adding a file entry to "admin/content/files". This happens on the DrupalImage plugin when the user "saves" the image closing the dialog.
One funny thing to note is that if I decide to remove the image before I save the node, the file still exists in Drupal. Also to note, if I remove the image from the node via the WYSIWYG editor, the "useage" part of the file table still says that it is being used on the node I deleted it from. So, there are a couple of bugs to deal with there...I should submit those when I have time...
I don't think adding a file entity happens in the plugin JS but rather somewhere else in the CKEditor module code. It might be easiest to just make an AJAX call back to Drupal however you create an entity that way.
That is how you could save a file, but since we aren't actually storing a file that doesn't make sense.
The View at "admin/structure/views/view/files" is where the list is generated...so if a Filestack entity could be created and merged into the files view, then all the parts of the table can be shown.
Now that the image tag inserts correctly, the second part is adding a file entry to "admin/content/files". This happens on the
DrupalImage
plugin when the user "saves" the image closing the dialog.One funny thing to note is that if I decide to remove the image before I save the node, the file still exists in Drupal. Also to note, if I remove the image from the node via the WYSIWYG editor, the "useage" part of the file table still says that it is being used on the node I deleted it from. So, there are a couple of bugs to deal with there...I should submit those when I have time...
I don't think adding a file entity happens in the plugin JS but rather somewhere else in the CKEditor module code. It might be easiest to just make an AJAX call back to Drupal however you create an entity that way.
https://api.drupal.org/api/drupal/core%21modules%21file%21file.module/function/file_save_data/8.6.x
That is how you could save a file, but since we aren't actually storing a file that doesn't make sense.
The View at "admin/structure/views/view/files" is where the list is generated...so if a Filestack entity could be created and merged into the files view, then all the parts of the table can be shown.