generatePluginDiv = (data, globId, pluginId) => {
  if (typeof data === 'function') {
    return;
  }
  let plugin;
  if (typeof data === 'string') {
    plugin = {
      name: data
    };
  } else {
    plugin = Object.assign({}, data);
  }
  const div = document.createElement('div');
  div.className = 'filters__use__item';

  const useCross = document.createElement('span');
  useCross.tabIndex = 0;
  useCross.className = 'filters__use__cross';
  useCross.addEventListener('click', pluginRemoveEvent(globId, pluginId));
  useCross.addEventListener('keypress', pluginRemoveEvent(globId, pluginId));
  div.appendChild(useCross);

  const input = document.createElement('input');
  input.value = plugin.name;
  input.setAttribute('spellcheck', false);
  input.addEventListener('keyup', pluginNameListener(globId, pluginId));
  input.addEventListener('keypress', pluginNameListener(globId, pluginId));
  div.appendChild(input);

  delete plugin.name;
  const pre = document.createElement('pre');
  preventPre(pre);
  pre.className = 'filters__use__data';
  pre.setAttribute('contenteditable', true);
  pre.setAttribute('spellcheck', false);
  pre.addEventListener('keyup', pluginPropsListener(globId, pluginId));
  pre.addEventListener('keypress', pluginPropsListener(globId, pluginId));
  if (Object.keys(plugin).length) {
    let content = JSON.stringify(plugin, null, 2);
    content = content.substring(2, content.length - 1);
    content = content
      .split(/\n/)
      .map(row => row.replace(/^ {2}/, ''))
      .join('\n');
    pre.innerHTML = content;
  }
  div.appendChild(pre);

  return div;
}
Generate a plugin DOM
@param {string} data Plugin name
@param {number} globId
@param {number} pluginId