Remove redundant, unused decorators from RTE
These have since been replaced by decorators that operator whether in MD mode or otherwise. This might not be optimal because LINK entities do not appear in MD mode at all at the moment, but instead you see the ()[] md notation version.
This commit is contained in:
parent
ee5117525c
commit
31290f3377
1 changed files with 0 additions and 25 deletions
|
@ -113,31 +113,6 @@ let emojiDecorator = {
|
||||||
* Returns a composite decorator which has access to provided scope.
|
* Returns a composite decorator which has access to provided scope.
|
||||||
*/
|
*/
|
||||||
export function getScopedRTDecorators(scope: any): CompositeDecorator {
|
export function getScopedRTDecorators(scope: any): CompositeDecorator {
|
||||||
let MemberAvatar = sdk.getComponent('avatars.MemberAvatar');
|
|
||||||
|
|
||||||
let usernameDecorator = {
|
|
||||||
strategy: (contentBlock, callback) => {
|
|
||||||
findWithRegex(USERNAME_REGEX, contentBlock, callback);
|
|
||||||
},
|
|
||||||
component: (props) => {
|
|
||||||
let member = scope.room.getMember(props.children[0].props.text);
|
|
||||||
// unused until we make these decorators immutable (autocomplete needed)
|
|
||||||
let name = member ? member.name : null;
|
|
||||||
let avatar = member ? <MemberAvatar member={member} width={16} height={16}/> : null;
|
|
||||||
return <span className="mx_UserPill">{avatar}{props.children}</span>;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
let roomDecorator = {
|
|
||||||
strategy: (contentBlock, callback) => {
|
|
||||||
findWithRegex(ROOM_REGEX, contentBlock, callback);
|
|
||||||
},
|
|
||||||
component: (props) => {
|
|
||||||
return <span className="mx_RoomPill">{props.children}</span>;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// TODO Re-enable usernameDecorator and roomDecorator
|
|
||||||
return [emojiDecorator];
|
return [emojiDecorator];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue