daviferreira/medium-editor — pull request #90 by devalnor (2013-11-18 19:51:15+00:00)
Title: Feature/multieditor: Enable Multi Editor in the same (or many) instance.

After your comment on my previous PR quick fix, this is the PR for a real multi-editor in the same (or many) instance.

This PR include a new multi-editor demo page for testing.

Changes:
---
- Improve getSelectionElement() to work in any cases and fixed the bug on multi element selection.
- Fix Issue https://github.com/daviferreira/medium-editor/issues/88 & https://github.com/daviferreira/medium-editor/issues/89
- Refactor the fix for https://github.com/daviferreira/medium-editor/pull/86 (sorry for that but I don’t understand why to bind mousedown is required. This execute checkSelection() twice. So I tried to merge both code for a better and clean code. Hope it’s ok)
- Improved binding for multiple editor instance. checkSelection() is called only one time per instance.
- Improved allowMultiParagraphSelection filter by removing empty tags elements before counting and consider header tags has a paragraph too (same as medium).