statamic / Fieldtype-EpicEditor

Statamic Fieldtype for Epic Editor, a fullscreen Markdown editor
15 stars 1 forks source link

Update to latest EpicEditor library #7

Open peterbaker opened 11 years ago

peterbaker commented 11 years ago

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?

jackmcdade commented 11 years ago

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 notifications@github.com 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.

peterbaker commented 11 years ago

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.