scribe-editor
Advanced tools
Comparing version 1.4.0 to 1.4.1
@@ -0,1 +1,7 @@ | ||
# 1.4.1 | ||
Small optimisation to avoid a relayout as a result of placing Scribe markers. | ||
Thanks for improvement [Brad Vogel](https://github.com/bradvogel) | ||
# 1.4.0 | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "scribe-editor", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"main": "src/scribe.js", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
Scribe [](https://travis-ci.org/guardian/scribe) | ||
====== | ||
[](https://gitter.im/guardian/scribe?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
A rich text editor framework for the web platform, with patches for | ||
@@ -5,0 +7,0 @@ browser inconsistencies and sensible defaults. |
@@ -84,4 +84,6 @@ define([ | ||
var startMarker = document.createElement('em'); | ||
startMarker.style.display = 'none'; | ||
startMarker.classList.add('scribe-marker'); | ||
var endMarker = document.createElement('em'); | ||
endMarker.style.display = 'none'; | ||
endMarker.classList.add('scribe-marker'); | ||
@@ -88,0 +90,0 @@ |
@@ -173,3 +173,3 @@ define([ | ||
// Get scribe previous content, and strip markers. | ||
var lastContentNoMarkers = scribe._lastItem.content.replace(/<em class="scribe-marker">[^<]*?<\/em>/g, ''); | ||
var lastContentNoMarkers = scribe._lastItem.content.replace(/<em [^>]*class="scribe-marker"[^>]*>[^<]*?<\/em>/g, ''); | ||
@@ -176,0 +176,0 @@ // We only want to push the history if the content actually changed. |
203591
4217
207