Skip to content

Commit afe989e

Browse files
Merge pull request #3276 from DMPRoadmap/tinymce-update
updated JS that interacts with TinyMCE so that it stops using depreca…
2 parents 9f55ff5 + 44667f8 commit afe989e

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Changelog
22

3-
### Added
3+
### Added
44

55
- Added CHANGELOG.md and Danger Github Action [#3257](https://github.com/DMPRoadmap/roadmap/issues/3257)
66
- Added validation with custom error message in research_output.rb to ensure a user does not enter a very large value as 'Anticipated file size'. [#3161] (https://github.com/DMPRoadmap/roadmap/issues/3161)
77
### Fixed
88

9+
- Updated JS that used to call the TinyMCE `setMode()` function so that it now calls `mode.set()` because the former is now deprecated.
10+
911
### Changed

app/javascript/src/answers/edit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ $(() => {
180180
} else {
181181
// Sets the editor mode for each editor to readonly
182182
Tinymce.findEditorsByClassName(editorClass).forEach((editor) => {
183-
editor.setMode('readonly');
183+
editor.mode.set('readonly');
184184
});
185185
}
186186

app/javascript/src/orgs/adminEdit.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ $(() => {
1010
const editor = Tinymce.findEditorById('org_feedback_msg');
1111
if (isObject(editor)) {
1212
if ($('#org_feedback_enabled_true').is(':checked')) {
13-
editor.setMode('code');
13+
editor.mode.set('design');
1414
} else {
15-
editor.setMode('readonly');
15+
editor.mode.set('readonly');
1616
}
1717
}
1818
};

0 commit comments

Comments
 (0)