RTE plain text mentions as pills (#10852)
* insert mentions as links styled as pills * post merge fix and update test * update comments, move typeguard out * create a text node instead of setting innerText * update test * update test * fix broken cypress test, remove .only * make it able to deal with inserting in middle of blank lines * update comment * fix strict null error * use typeguard * avoid implicit truth check * add hook tests * add comment * Update test/components/views/rooms/wysiwyg_composer/hooks/usePlainTextListeners-test.tsx Co-authored-by: Andy Balaam <andy.balaam@matrix.org> --------- Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
This commit is contained in:
parent
acdbae3e8c
commit
0d981326ac
6 changed files with 146 additions and 40 deletions
|
@ -17,3 +17,7 @@ limitations under the License.
|
|||
export function isNotNull<T>(arg: T): arg is Exclude<T, null> {
|
||||
return arg !== null;
|
||||
}
|
||||
|
||||
export function isNotUndefined<T>(arg: T): arg is Exclude<T, undefined> {
|
||||
return arg !== undefined;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue