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

added the ability to wrap a textarea #232

Merged
merged 11 commits into from
Sep 1, 2013

Conversation

bytespider
Copy link
Contributor

Wrap a textarea with the container and use that as the sync textarea

@OscarGodson
Copy link
Owner

So, to be clear, if you had:

<div id="epiceditor">
  <textarea></textarea>
</div>

It would use that textarea, automatically, to sync content?

@bytespider
Copy link
Contributor Author

That's the idea

@bytespider
Copy link
Contributor Author

Removed check and IE10 tested

@OscarGodson
Copy link
Owner

Rad! I'll check play with this when I get home tonight then. Thanks, man!

@OscarGodson
Copy link
Owner

Pulled this down and it doesn't appear to work for me.

  <div id="epiceditor">
    <textarea></textarea>
  </div>
  <script src="/epiceditor/js/epiceditor.js"></script>
  <script>
    var editor = new EpicEditor().load();
  </script>

The textarea appears to be removed. This line is doing it (99.9% sure)

https://github.com/OscarGodson/EpicEditor/blob/develop/src/editor.js#L532

Actually, I'm not sure how this worked for you since self.element is whatever you give it: https://github.com/OscarGodson/EpicEditor/blob/develop/src/editor.js#L375-L380 :P

@bytespider
Copy link
Contributor Author

The loading from the contained textarea definatly works for me, however what I hadn't tested or checked was that the textarea is placed back on the form after the editor is done.

Think I might need to play with this a little before you consider pulling this.

@OscarGodson
Copy link
Owner

oh, I see. This was just for initial loading. Yeah, most people requested the textarea feature so that they could submit a form the old school way so the textarea has to be in the DOM when the form is submitted.

@bytespider
Copy link
Contributor Author

What's your feelings on CSS added via JS? In this case,'self.settings.textarea.style.display = 'none';?

@OscarGodson
Copy link
Owner

As long as the docs make it clear that by putting the textarea in the epiceditor container will hide the textarea and replace it with epiceditor.

@bytespider
Copy link
Contributor Author

I believe this is complete. Fancy giving it a go?

@OscarGodson
Copy link
Owner

Will do, sorry for the delay. I've been reviewing PRs for the 0.2.1 release. I'm going to package and ship 0.2.1 first and then I'll take a look at this. I will try to package and ship it tonight and take a look at this tomorrow. Thanks again!

@bytespider
Copy link
Contributor Author

Ah, I thought perhaps you weren't sure I'd finihed making changes.

Sent from Mailbox for iPhone

On Mon, Jun 10, 2013 at 7:00 PM, Oscar Godson notifications@github.com
wrote:

Will do, sorry for the delay. I've been reviewing PRs for the 0.2.1 release. I'm going to package and ship 0.2.1 first and then I'll take a look at this. I will try to package and ship it tonight and take a look at this tomorrow. Thanks again!

Reply to this email directly or view it on GitHub:
#232 (comment)

@OscarGodson
Copy link
Owner

OK, 0.2.1 was just released. I'll take a look at this ASAP (tonight/tomorrow) and test it in all the browsers.

@OscarGodson
Copy link
Owner

OK, checked and everything looks and works good. Few things:

  1. Can you use _applyAttrs?
  2. Can you do typeof x instead of typeof(x) as it fits more inline with the styles
  3. Add docs (edit the README.md the file and then run jake docs)

If you don't have time or don't want to I can take care of these myself.

@OscarGodson
Copy link
Owner

P.S. sorry it took so long to get to this. Was busy with stuff :(

@OscarGodson
Copy link
Owner

bump?

@bytespider
Copy link
Contributor Author

Yeah sorry, newborns can be a little distracting. I'll look into this weds/thurs as I'm back to work then

Sent from Mailbox for iPhone

On Tue, Jul 16, 2013 at 7:30 AM, Oscar Godson notifications@github.com
wrote:

bump?

Reply to this email directly or view it on GitHub:
#232 (comment)

@OscarGodson
Copy link
Owner

@bytespider totally understood. Thanks :)

@OscarGodson
Copy link
Owner

I just noticed you put some commits in. Is that everything you wanted to get in?

@bytespider
Copy link
Contributor Author

I think so, unless you had some comments on the docs?

Sent from Mailbox for iPhone

On Mon, Jul 22, 2013 at 11:28 PM, Oscar Godson notifications@github.com
wrote:

I just noticed you put some commits in. Is that everything you wanted to get in?

Reply to this email directly or view it on GitHub:
#232 (comment)

@OscarGodson
Copy link
Owner

Rad, no, I just never got a comment from you. I don't get notified of commits, just comments :) I'll look at it during lunch

@bytespider
Copy link
Contributor Author

Oh right, Thought it did as the commits were inline on GH

Sent from Mailbox for iPhone

On Tue, Jul 23, 2013 at 7:06 PM, Oscar Godson notifications@github.com
wrote:

Rad, no, I just never got a comment from you. I don't get notified of commits, just comments :) I'll look at it during lunch

Reply to this email directly or view it on GitHub:
#232 (comment)

@OscarGodson
Copy link
Owner

When I mentioned applyAttrs, I didn't mean that one style, I meant where you set that block of attrs on L540-L543.

@bytespider
Copy link
Contributor Author

Clearly I miss understood you. Will sort.

Sent from Mailbox for iPhone

On Tue, Jul 23, 2013 at 11:07 PM, Oscar Godson notifications@github.com
wrote:

When I mentioned applyAttrs, I didn't mean that one style, I meant where you set that block of attrs on L540-L543.

Reply to this email directly or view it on GitHub:
#232 (comment)

@OscarGodson
Copy link
Owner

@bytespider
Copy link
Contributor Author

Okay. So I used _applyAttrs, however it refuses to set frameborder.
Therefore I updated _applyAttrs to use setAttribute instead.

@OscarGodson
Copy link
Owner

I will review this ASAP :) I wanna get this into the next release!

@OscarGodson OscarGodson merged commit 75031c9 into OscarGodson:develop Sep 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants