Samuell1 / contenteditor-plugin

Edit your content in page - plugin for OctoberCMS
http://octobercms.com/plugin/samuell-contenteditor
MIT License
39 stars 19 forks source link

Plugin no longer works on OctoberCMS v3 due to changes to OctobeCMS Ajax API #126

Closed andrepo closed 1 year ago

andrepo commented 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] } } );

Zmove commented 1 year ago

It would also be great to remove jquery dependency as it's not required anymore with ocms 3.x

Samuell1 commented 1 year ago

Closed by #121