Skip to content

Commit fded52c

Browse files
authored
Merge pull request #4264 from nextcloud/backport/3906/stable27
[stable27] fix: paste multiple line to table issue
2 parents 8dede5c + 9aa8cf9 commit fded52c

File tree

15 files changed

+70
-18
lines changed

15 files changed

+70
-18
lines changed

β€Žcypress/e2e/nodes/Table.spec.jsβ€Ž

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,24 @@ describe('table plugin', () => {
119119
.should('have.length', 3)
120120
.each(td => cy.wrap(td).should('have.css', 'text-align', 'center'))
121121
})
122+
123+
it('Creates table and add multilines', function() {
124+
const multilinesContent = 'Line 1\nLine 2\nLine 3'
125+
126+
cy.getActionEntry('table').click()
127+
cy.getContent()
128+
.find('table:nth-of-type(1) tr:nth-child(2) td:nth-child(1)')
129+
.click()
130+
131+
cy.getContent()
132+
.type(multilinesContent)
133+
134+
cy.getContent()
135+
.find('table:nth-of-type(1) tr:nth-child(2) td:nth-child(1) .content')
136+
.then(($el) => {
137+
expect($el.get(0).innerHTML).to.equal(multilinesContent.replace(/\n/g, '<br>'))
138+
})
139+
})
122140
})
123141

124142
describe('Table extension integrated in the editor', () => {

β€Žcypress/e2e/workspace.spec.jsβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ describe('Workspace', function() {
298298
checkContent()
299299
})
300300
})
301+
301302
})
302303

303304
const openSidebar = filename => {

β€Žjs/editor.jsβ€Ž

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žjs/editor.js.mapβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žjs/text-editors.jsβ€Ž

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žjs/text-editors.js.mapβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žjs/text-files.jsβ€Ž

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žjs/text-files.js.mapβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žjs/text-public.jsβ€Ž

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žjs/text-public.js.mapβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
Β (0)