Let browser insert text

This commit is contained in:
Chi Vinh Le
2018-03-25 23:17:47 +02:00
parent 7437595002
commit 45ad7eeff7
2 changed files with 4 additions and 13 deletions
+1
View File
@@ -0,0 +1 @@
export { withSlotElements } from 'coral-framework/hocs';
@@ -79,9 +79,9 @@ class RTE extends React.Component {
forEachFeature(callback) {
Object.keys(this.featuresRef).map(k => {
const instance = this.featureRef[k].getFeatureInstance
? this.featureRef[k].getFeatureInstance()
: this.featureRef[k];
const instance = this.featuresRef[k].getFeatureInstance
? this.featuresRef[k].getFeatureInstance()
: this.featuresRef[k];
callback(instance);
});
}
@@ -248,16 +248,6 @@ class RTE extends React.Component {
}
};
handleKeyPress = e => {
const character = String.fromCharCode(e.charCode);
if (character) {
insertText(character);
this.handleChange();
e.preventDefault();
return false;
}
};
restoreCheckpoint(html, node, range) {
if (node && range) {
// We need to clone it, otherwise we'll mutate