Skip to content

Conversation

yamsellem
Copy link

Josh,

This is my first attempt for headings.
The main ideas come from https://github.com/mquan/freshereditor.

Because I'm not sure a selectbox (or a long button list) is a good idea for headings, I've used a unique switching button: p -> h1 -> h2 -> h3 -> p.

What do you think?
ps. I can't find a way to make Etch works on IE7. Have you a clue on how I can provide this?

@joshontheweb
Copy link
Owner

I love the idea of cycling through the headings instead of a dropdown. Also the isTagMatchingSelection function is handy. I have merged your changes into a staging branch. It looks like there are still some problems to be ironed out. For instance if I hit 'enter' at the beginning of an editable area creating a

above the

and then cycle through the headings on the

, the headings create headings within themselves successively. Lets get the bugs worked out and then I'll merge it into master.
As far as ie7 support goes, I don't have a windows machine to do testing on right now. Can you explain more about what isn't working in ie7? Are you including rangy-core.js? I will get a windows testing set up soon and can probably help out better then. Thanks for contributing.

@yamsellem
Copy link
Author

Talking about the headings, I've also noticed similar issues like the ones you are pointing: adding the heading into a list will make it unmodifiable until unactivating the list :-(.

For the second pull request, a colleague have solved the Firefox issue: event.srcElement seems to not work on every browser. Your site works... because it uses an older version of etch.js with event.target.

To make it works on every browser my colleague have followed this stackoverflow question: http://stackoverflow.com/questions/5301643/how-can-i-make-event-srcelement-work-in-firefox-and-what-does-it-mean

Hope we don't have misunderstood something.
Have a nice week-end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants