Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing a file with textarea syncing stops syncing #286

Closed
OscarGodson opened this issue Sep 6, 2013 · 2 comments
Closed

Changing a file with textarea syncing stops syncing #286

OscarGodson opened this issue Sep 6, 2013 · 2 comments
Milestone

Comments

@OscarGodson
Copy link
Owner

For example:

<body>
  <textarea id="foo"></textarea>
  <div id="epiceditor"></div>
<script>
  var editor = new EpicEditor({ textarea: 'foo', clientSideStorage: false }).load();
  editor.importFile('TEST', 'lol');
</script>

The editor will stop syncing now. Problem is we cache the self.settings.file.name var outside the _syncTextarea function so it will only write to that file which isn't changing.

Reported originally from: #285

OscarGodson added a commit that referenced this issue Sep 6, 2013
This also changes the behavior of the create event. Before create would
fire _before_ the file was created meaning if you asked for the file
inside of create it would give you undefined. I've moved the create
event into save, rather than importFile, and it fires after the file is
created.
OscarGodson added a commit that referenced this issue Sep 6, 2013
Make sure that the file actually exists when the create event is fired.
@OscarGodson
Copy link
Owner Author

##RELEASE NOTE:

This changes the behavior of the create event. See b7ca05b's commit message.

@svenjacobs
Copy link

Yes, I can confirm this has been fixed. Thank you!

OscarGodson added a commit that referenced this issue Sep 6, 2013
This fixes issues with syncing with clientSideStorage enabled and the
editor's first load on the page showing the textarea as blank.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants