inetis-ch/oc-richeditorsnippets-plugin

Components ajax handlers not found when loaded into custom variable richeditor

thedoofus opened this issue · 1 comments

I have a syntax field added on a layout to show a richeditor field on the page.
{variable type="richeditor" name="intro_content" label="Introduction" tab="Top Section"}{/variable}

I have a component, regsitered as a page snippet that shows a form and makes an ajax post to the onSubmit handler.

When i add this component to the main content of the staticPages plugin the component's handlers work as you'd expect.

But when the snippet is added to my custom syntax field richeditor (intro_content) - the ajax request fails with the error that the onSubmit handler can't be found.

Sorry to have let this hang for a year, I just found some time to work on this plugin.

I fixed an issue where prefixing the handler with the component alias (using {{ __SELF__ }}::onSubmit) was breaking the regex for the handler.

I will release v2.1.1 with the fix on monday, please let me know if you still have issues with AJAX handlers with the new version.