Skip to content

Commit a627bb7

Browse files
Bump django-tinymce from 3.5.0 to 4.1.0 (#4210)
* Bump django-tinymce from 3.5.0 to 4.1.0 Bumps [django-tinymce](https://github.com/jazzband/django-tinymce) from 3.5.0 to 4.1.0. - [Release notes](https://github.com/jazzband/django-tinymce/releases) - [Changelog](https://github.com/jazzband/django-tinymce/blob/master/CHANGELOG.rst) - [Commits](jazzband/django-tinymce@3.5.0...4.1.0) --- updated-dependencies: - dependency-name: django-tinymce dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * fix deps * use specific command to handle tinyMCE in e2e tests * fix command cypress * fix command cypress * fix deprecation warning --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jean-Etienne Castagnede <[email protected]>
1 parent a1dc88c commit a627bb7

File tree

6 files changed

+24
-22
lines changed

6 files changed

+24
-22
lines changed

cypress/package-lock.json

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

cypress/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"dependencies": {
3-
"@foreachbe/cypress-tinymce": "^1.0.0",
43
"cypress": "^9.5.1"
54
}
65
}

cypress/support/commands.js

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,21 @@ Cypress.Commands.add('mockTiles', (username, password) => {
2323
cy.intercept("https://*.tile.opentopomap.org/*/*/*.png", {fixture: "images/tile.png"}).as("tiles");
2424
});
2525

26+
27+
Cypress.Commands.add('setTinyMceContent', (tinyMceId, content) => {
28+
cy.window().then((win) => {
29+
const editor = win.tinymce.get(tinyMceId);
30+
editor.setContent(content);
31+
});
32+
});
33+
34+
Cypress.Commands.add('getTinyMceContent', (tinyMceId, content) => {
35+
cy.window().then((win) => {
36+
const editor = win.tinymce.get(tinyMceId);
37+
return editor.getContent();
38+
});
39+
});
40+
2641
Cypress.Commands.add('getCoordsOnMap', (pathPk, percentage) => {
2742
cy.getPath(pathPk).then(path => {
2843
let domPath = path.get(0);
@@ -31,7 +46,7 @@ Cypress.Commands.add('getCoordsOnMap', (pathPk, percentage) => {
3146
let pathLength = domPath.getTotalLength();
3247
let lengthAtPercentage = percentage * pathLength / 100;
3348
return domPath.getPointAtLength(lengthAtPercentage);
34-
})
49+
});
3550
});
3651

3752
Cypress.Commands.add('getCoordsOnPath', (pathPk, percentage) => {
@@ -54,10 +69,9 @@ Cypress.Commands.add('getCoordsOnPath', (pathPk, percentage) => {
5469
y: coordsOnMap.y - verticalDelta,
5570
}
5671
});
57-
})
58-
59-
})
60-
})
72+
});
73+
});
74+
});
6175

6276
Cypress.Commands.add('getMap', () => cy.get('[id="id_topology-map"]'));
6377
Cypress.Commands.add('getPath', pathPk => cy.get(`[data-test=pathLayer-${pathPk}]`));

cypress/support/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,4 @@
1717
import './commands'
1818

1919
// Alternatively you can use CommonJS syntax:
20-
// require('./commands')
21-
import '@foreachbe/cypress-tinymce'
20+
// require('./commands')

geotrek/flatpages/widgets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
],
6868
},
6969
],
70-
"newline_behavior": "",
70+
"newline_behavior": "default",
7171
"default_font_stack": ["-apple-system", "Helvetica", "Arial", "sans-serif"],
7272
"theme": "silver",
7373
"paste_auto_cleanup_on_paste": True,

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ django==4.2.23
108108
# django-leaflet
109109
# django-modelcluster
110110
# django-modeltranslation
111+
# django-tinymce
111112
# django-treebeard
112113
# django-weasyprint
113114
# djangorestframework
@@ -154,7 +155,7 @@ django-modeltranslation==0.19.15
154155
# via mapentity
155156
django-mptt==0.17.0
156157
# via geotrek (setup.py)
157-
django-tinymce==3.5.0
158+
django-tinymce==4.1.0
158159
# via mapentity
159160
django-treebeard==4.7.1
160161
# via geotrek (setup.py)

0 commit comments

Comments
 (0)