prompt
large_stringlengths
72
228k
completion
large_stringlengths
0
1.52k
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar';<|fim▁hole|>import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client';<|fim▁hole|>import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar';<|fim▁hole|> import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; <|fim▁hole|>import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor';<|fim▁hole|>import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme';<|fim▁hole|> describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; <|fim▁hole|>describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => {<|fim▁hole|> const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({<|fim▁hole|> add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false,<|fim▁hole|> base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce'<|fim▁hole|> }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true);<|fim▁hole|> it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); <|fim▁hole|> it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => {<|fim▁hole|> const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor();<|fim▁hole|> editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>');<|fim▁hole|> TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]);<|fim▁hole|> TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left());<|fim▁hole|> TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc');<|fim▁hole|> TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2);<|fim▁hole|> TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>');<|fim▁hole|> }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
import { Keys } from '@ephox/agar';
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar';<|fim▁hole|>import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
import { describe, it } from '@ephox/bedrock-client';
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client';<|fim▁hole|> import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar';
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; <|fim▁hole|>import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
import Editor from 'tinymce/core/api/Editor';
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor';<|fim▁hole|> describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
import Theme from 'tinymce/themes/silver/Theme';
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; <|fim▁hole|> const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => {
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => {<|fim▁hole|> add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
const hook = TinyHooks.bddSetupLight<Editor>({
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({<|fim▁hole|> base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
add_unload_trigger: false,
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false,<|fim▁hole|> }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
base_url: '/project/tinymce/js/tinymce'
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce'<|fim▁hole|> it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
}, [ Theme ], true);
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); <|fim▁hole|> const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
it('Type text before cef inline element', () => {
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => {<|fim▁hole|> editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
const editor = hook.editor();
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor();<|fim▁hole|> TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
editor.setContent('<p><span contenteditable="false">a</span></p>');
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>');<|fim▁hole|> TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
TinySelections.select(editor, 'p', [ 1 ]);
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]);<|fim▁hole|> TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
TinyContentActions.keystroke(editor, Keys.left());
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left());<|fim▁hole|> TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
TinyContentActions.type(editor, 'bc');
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc');<|fim▁hole|> TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
TinyAssertions.assertCursor(editor, [ 0, 0 ], 2);
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2);<|fim▁hole|> }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>');
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>');<|fim▁hole|> it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
});
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); <|fim▁hole|> const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
it('Type after cef inline element', () => {
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => {<|fim▁hole|> editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
const editor = hook.editor();
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor();<|fim▁hole|> TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
editor.setContent('<p><span contenteditable="false">a</span></p>');
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>');<|fim▁hole|> TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
TinySelections.select(editor, 'p', [ 1 ]);
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]);<|fim▁hole|> TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
TinyContentActions.keystroke(editor, Keys.right());
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right());<|fim▁hole|> TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
TinyContentActions.type(editor, 'bc');
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc');<|fim▁hole|> TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
TinyAssertions.assertCursor(editor, [ 0, 1 ], 3);
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3);<|fim▁hole|> }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>');
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>');<|fim▁hole|> it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
});
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); <|fim▁hole|> const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
it('Type between cef inline elements', () => {
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => {<|fim▁hole|> editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
const editor = hook.editor();
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor();<|fim▁hole|> TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>');
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>');<|fim▁hole|> TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
TinySelections.select(editor, 'p', [ 3 ]);
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]);<|fim▁hole|> TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
TinyContentActions.keystroke(editor, Keys.left());
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left());<|fim▁hole|> TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
TinyContentActions.keystroke(editor, Keys.left());
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left());<|fim▁hole|> TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
TinyContentActions.type(editor, 'bc');
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc');<|fim▁hole|> TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3);
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3);<|fim▁hole|> }); });<|fim▁end|>
TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>');
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>');<|fim▁hole|>});<|fim▁end|>
});
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); });<|fim▁hole|><|fim▁end|>
});
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client';
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar';<|fim▁hole|> import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar';
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client';<|fim▁hole|>import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar';
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar';<|fim▁hole|>import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
import Editor from 'tinymce/core/api/Editor';
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; <|fim▁hole|> describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme';
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor';<|fim▁hole|>describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
import Theme from 'tinymce/themes/silver/Theme';
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme';<|fim▁hole|> const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => {
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; <|fim▁hole|> add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => {<|fim▁hole|> base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false,
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({<|fim▁hole|> }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce'
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false,<|fim▁hole|> it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true);
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce'<|fim▁hole|> it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
}, [ Theme ], true);
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true);<|fim▁hole|> const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
it('Type text before cef inline element', () => {
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); <|fim▁hole|> editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
it('Type text before cef inline element', () => { const editor = hook.editor();
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => {<|fim▁hole|> TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>');
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor();<|fim▁hole|> TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]);
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>');<|fim▁hole|> TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left());
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]);<|fim▁hole|> TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc');
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left());<|fim▁hole|> TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2);
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc');<|fim▁hole|> }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>');
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2);<|fim▁hole|> it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); });
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>');<|fim▁hole|> it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
});
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); });<|fim▁hole|> const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
it('Type after cef inline element', () => {
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); <|fim▁hole|> editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
it('Type after cef inline element', () => { const editor = hook.editor();
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => {<|fim▁hole|> TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>');
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor();<|fim▁hole|> TinyContentActions.keystroke(editor, Keys.right()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]);
<|file_name|>TypeTextAtCefTest.ts<|end_file_name|><|fim▁begin|>import { Keys } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar'; import Editor from 'tinymce/core/api/Editor'; import Theme from 'tinymce/themes/silver/Theme'; describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => { const hook = TinyHooks.bddSetupLight<Editor>({ add_unload_trigger: false, base_url: '/project/tinymce/js/tinymce' }, [ Theme ], true); it('Type text before cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>'); TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 0 ], 2); TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>'); }); it('Type after cef inline element', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span></p>');<|fim▁hole|> TinyContentActions.type(editor, 'bc'); TinyAssertions.assertCursor(editor, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>'); }); it('Type between cef inline elements', () => { const editor = hook.editor(); editor.setContent('<p><span contenteditable="false">a</span>&nbsp;<span contenteditable="false">b</span></p>'); TinySelections.select(editor, 'p', [ 3 ]); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.keystroke(editor, Keys.left()); TinyContentActions.type(editor, 'bc'); TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3); TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc&nbsp;<span contenteditable="false">b</span></p>'); }); });<|fim▁end|>
TinySelections.select(editor, 'p', [ 1 ]); TinyContentActions.keystroke(editor, Keys.right());

Overview

I noticed a lack of good code infill datasets/models in the open-source community, so I created one myself, with thanks to Fimbulvntr for their assistance in creating this dataset.

I used 10k code files from multiple programming languages to create this dataset.

{
        "Python": 3000,
        "JavaScript": 1500,
        "TypeScript": 1250,
        "Rust": 1750,
        "Java": 1500,
        "GO": 500,
        "C++": 500
}

Note

This dataset supports code completion for up to 4 lines (though in my small test, the model performed impressively even beyond this limit).

How to Use

Training can be tricky. You need to disable shuffling and add dynamic gradient accumulation steps. Here's a training Colab notebook: Training Colab Book.

Downloads last month
2
Edit dataset card