Fieldtype-EpicEditor icon indicating copy to clipboard operation
Fieldtype-EpicEditor copied to clipboard

Update to latest EpicEditor library

Open peterbaker opened this issue 12 years ago • 2 comments

I tried updating this to the latest version of EpicEditor, in order to fix the issue of whitespace being stripped from all lines (screwing up nested code blocks on line-items), but now it seems that the communication from the iframed editor and the actual textarea that gets saved is being ignored. On save, no changes in the editor are being passed to the textarea. Any change you could look at updating this plugin, just to get the latest version of EpicEditor?

peterbaker avatar Oct 09 '13 02:10 peterbaker

This is why I didn't update to the latest version of EpicEditor. Too many weird issues with it. I don't have any plans to update this in the near future as we're terribly focused on the Statamic core and Marketplace, but would be happy to accept any Pull Requests if you or anyone are willing to experiment.

On Oct 8, 2013, at 10:35 PM, peterbaker [email protected] wrote:

I tried updating this to the latest version of EpicEditor, in order to fix the issue of whitespace being stripped from all lines (screwing up nested code blocks on line-items), but now it seems that the communication from the iframed editor and the actual textarea that gets saved is being ignored. On save, no changes in the editor are being passed to the textarea. Any change you could look at updating this plugin, just to get the latest version of EpicEditor?

— Reply to this email directly or view it on GitHub.

jackmcdade avatar Oct 09 '13 03:10 jackmcdade

Actually, looks like it was an easy fix:

Change: editor_{$this->tabindex}.on('save', function () {

To: editor_{$this->tabindex}.on('update', function () {

I also added the Markdown Extra parser so the preview side is accurately previewing the same Markdown that Statamic is using. I'll try and package this all up better and submit it.

peterbaker avatar Oct 09 '13 14:10 peterbaker