guardian/scribe

Feature request: don't ever touch `innerHTML`

Open

#209 geöffnet am 25. Juni 2014

Auf GitHub ansehen
 (20 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (265 Forks)batch import
discussionhelp wantedpatch needed

Repository-Metriken

Stars
 (3.516 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

There's currently a very frustrating fundamental limitation in Scribe, which is that the "normalization" logic operates on raw HTML, rather then DOM nodes. This means plugins that get JavaScript references to DOM nodes end up becoming invalid because Scribe rewrites the DOM inside the editor and thus new nodes are created.

I'm currently having to do very hacky things like setting an id immediately before I know that the editor will be "normalized" and then getting a fresh DOM reference based off of the id. We've had to resort to hacks like this a few times already, and I'm trying to think of what a more compatible solution would be.

Contributor Guide