mirror of
https://github.com/wassname/talk.git
synced 2026-07-13 11:45:55 +08:00
Let browser insert text
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user