mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-24 16:01:42 +02:00
reapply pills, link preview, code highlighting, ... after edit
This commit is contained in:
parent
6366371c0d
commit
d73f547f55
@ -88,7 +88,10 @@ module.exports = React.createClass({
|
|||||||
|
|
||||||
componentDidMount: function() {
|
componentDidMount: function() {
|
||||||
this._unmounted = false;
|
this._unmounted = false;
|
||||||
|
this._applyFormatting();
|
||||||
|
},
|
||||||
|
|
||||||
|
_applyFormatting() {
|
||||||
// pillifyLinks BEFORE linkifyElement because plain room/user URLs in the composer
|
// pillifyLinks BEFORE linkifyElement because plain room/user URLs in the composer
|
||||||
// are still sent as plaintext URLs. If these are ever pillified in the composer,
|
// are still sent as plaintext URLs. If these are ever pillified in the composer,
|
||||||
// we should be pillify them here by doing the linkifying BEFORE the pillifying.
|
// we should be pillify them here by doing the linkifying BEFORE the pillifying.
|
||||||
@ -123,7 +126,11 @@ module.exports = React.createClass({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
componentDidUpdate: function() {
|
componentDidUpdate: function(prevProps) {
|
||||||
|
const messageWasEdited = prevProps.replacingEventId !== this.props.replacingEventId;
|
||||||
|
if (messageWasEdited) {
|
||||||
|
this._applyFormatting();
|
||||||
|
}
|
||||||
this.calculateUrlPreview();
|
this.calculateUrlPreview();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user