Sha256: c66cd17fa777a17da719a750f22ded34fb5f679d36a2d3505dd3543024acbc66
Contents?: true
Size: 642 Bytes
Versions: 15
Compression:
Stored size: 642 Bytes
Contents
import contextHelpers from "src/decidim/editor/test/toolbar/shared/context"; export default (ctx) => { const { getControl, setContent } = contextHelpers(ctx); describe("hardBreak", () => { it("creates a new line break at the cursor position", async () => { await setContent("Hello, world!"); ctx.prosemirror.focus(); getControl("hardBreak").click(); // Note that the "tailingBreak" is only ProseMirror's internal element // to place the cursor at the correct location. expect(ctx.prosemirror.innerHTML).toEqual('<p>Hello, world!<br><br class="ProseMirror-trailingBreak"></p>'); }); }); };
Version data entries
15 entries across 15 versions & 1 rubygems