fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
prevent empty span in a new node
[fnpeditor.git]
/
src
/
editor
/
plugins
/
core
/
core.js
diff --git
a/src/editor/plugins/core/core.js
b/src/editor/plugins/core/core.js
index
bc74e6b
..
9a333d0
100644
(file)
--- a/
src/editor/plugins/core/core.js
+++ b/
src/editor/plugins/core/core.js
@@
-122,6
+122,11
@@
plugin.documentExtension.textNode.transformations = {
parent.contents().some(function(n) {
return move(n, newNode);
});
parent.contents().some(function(n) {
return move(n, newNode);
});
+ if(newNodes.second.contents()[0].getText().length === 0) {
+ newNodes.second.detach();
+ newNodes.second = parent;
+ emptyText = newNodes.second.append({text: '\u200b'}); // why? why is ZWS needed here?
+ }
}
return _.extend(newNodes, {emptyText: emptyText});
}
return _.extend(newNodes, {emptyText: emptyText});