1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-07 21:23:00 +03:00

Add mentions as links to rte (#10463)

* adds autocomplete behaviour for mentions in rich text editor
* allows adding mentions as links
* adds tests
This commit is contained in:
alunturner
2023-03-31 14:14:55 +01:00
committed by GitHub
parent 212977c4ac
commit 6f791d28c8
11 changed files with 585 additions and 23 deletions

View File

@@ -16,12 +16,12 @@ limitations under the License.
import { EventTimeline, MatrixEvent } from "matrix-js-sdk/src/matrix";
import { createTestClient, getRoomContext, mkEvent, mkStubRoom } from "../../../../test-utils";
import { getRoomContext, mkEvent, mkStubRoom, stubClient } from "../../../../test-utils";
import { IRoomState } from "../../../../../src/components/structures/RoomView";
import EditorStateTransfer from "../../../../../src/utils/EditorStateTransfer";
export function createMocks(eventContent = "Replying <strong>to</strong> this new content") {
const mockClient = createTestClient();
const mockClient = stubClient();
const mockEvent = mkEvent({
type: "m.room.message",
room: "myfakeroom",