Closed andrepo closed 1 year ago
PR suggestion to make it work:
https://github.com/Samuell1/contenteditor-plugin/blob/f195dde758a44f3aeec7db9f45e4f3129ad7b72b/assets/contenteditor.js#L31
Change to const componentSelector = '*[data-file="' + name + '"]'; const handler = $(componentSelector).data('component'); // check for component name console.log('Processing [', name, '] - component [', componentSelector, '] - handler', handler); oc.request( componentSelector, handler, { data: { file: name, content: regions[name] } } );
It would also be great to remove jquery dependency as it's not required anymore with ocms 3.x
Closed by #121
PR suggestion to make it work:
https://github.com/Samuell1/contenteditor-plugin/blob/f195dde758a44f3aeec7db9f45e4f3129ad7b72b/assets/contenteditor.js#L31
Change to const componentSelector = '*[data-file="' + name + '"]'; const handler = $(componentSelector).data('component'); // check for component name console.log('Processing [', name, '] - component [', componentSelector, '] - handler', handler); oc.request( componentSelector, handler, { data: { file: name, content: regions[name] } } );