Skip to content
New issue

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

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

Already on GitHub? # to your account

Default file.name if container is an object or container doesnt have ID #102

Closed
OscarGodson opened this issue May 11, 2012 · 1 comment
Closed
Assignees
Milestone

Comments

@OscarGodson
Copy link
Owner

This has always been an issue I've just never reported this. By default EE tries to use the ID of the element as it's default file ID. for example, if you have <div id="poop"> in localStorage the file would be called poop if no name is given. We need to:

  1. If no name is given...
    1. If the element has an ID, use it
    2. If the element has no ID generate an ID auto-epiceditor-N where N = editor number on the page
  2. If a name is given, use it as is

for 1b, when we load up the files we can go through all the files with auto-epiceditor- and add the content based on the DOM placement.

Not urgent, but also something to think about, how do we handle multiple editors with the same file open?

@ghost ghost assigned OscarGodson Jun 10, 2012
@OscarGodson
Copy link
Owner Author

I found out when doing <div id="bar" class="foo"></div> and then doing EpicEditor({ container: document.getElementsByClassName('foo')[0] }) the resulting storage name is:

lol

@OscarGodson OscarGodson reopened this Jun 11, 2012
OscarGodson added a commit that referenced this issue Jun 17, 2012
…t] if the element didnt have an ID and no file name was given.

Also added unloads where applicable in the spec which sped up the tests.
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant