Repository navigation
SE-3247 Enable Autodesk's custom tinymce plugin #243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
pkulkark
wants to merge
9
commits into
opencraft-release/juniper.2
from
pooja/autodesk-s3url-plugin-changes
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f3c9e05
Changes to edx-platform for Autodesk's S3url plugin
pkulkark 9af51e6
Make generic env variable for s3url settings
pkulkark e1b7d56
Merge branch 'opencraft-release/juniper.2' of github.com:open-craft/e…
pkulkark dee3e23
Styling changes required for s3url
pkulkark 78e86aa
Add required styling to lms
pkulkark fe2c8a3
Enable env vars for prod
pkulkark 2f3c76f
Merge branch 'opencraft-release/juniper.2' of github.com:open-craft/e…
pkulkark 02dc564
remove autodesk specific styling
pkulkark 9a520b1
change plugin name to adsklink
pkulkark File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -124,10 +124,16 @@ | |
| Disable visual aid on borderless table. | ||
| */ | ||
| visual: false, | ||
| plugins: "textcolor, link, image, codemirror", | ||
| plugins: "textcolor, link, image, codemirror, adsklink", | ||
| codemirror: { | ||
| path: baseUrl + "js/vendor" | ||
| }, | ||
| adsklink: { | ||
| linktypes: process.env.ADDITIONAL_NODE_ENV_VARS ? JSON.parse(process.env.ADDITIONAL_NODE_ENV_VARS).ADSK_PLUGIN_LINKTYPES.split(',') : null, | ||
| filetypes: process.env.ADDITIONAL_NODE_ENV_VARS ? JSON.parse(process.env.ADDITIONAL_NODE_ENV_VARS).ADSK_PLUGIN_FILETYPES.split(',') : null, | ||
| orientations: process.env.ADDITIONAL_NODE_ENV_VARS ? JSON.parse(process.env.ADDITIONAL_NODE_ENV_VARS).ADSK_PLUGIN_ORIENTATIONS.split(',') : null, | ||
| styles: process.env.ADDITIONAL_NODE_ENV_VARS ? JSON.parse(process.env.ADDITIONAL_NODE_ENV_VARS).ADSK_PLUGIN_STYLES.split(',') : null | ||
| }, | ||
| image_advtab: true, | ||
|
|
||
| /* | ||
|
|
@@ -136,7 +142,7 @@ | |
| toolbar: "formatselect | fontselect | bold italic underline forecolor wrapAsCode | " + | ||
| "alignleft aligncenter alignright alignjustify | " + | ||
| "bullist numlist outdent indent blockquote | link unlink " + | ||
| ((this.new_image_modal ? 'insertImage' : 'image') + " | code"), | ||
| ((this.new_image_modal ? 'insertImage' : 'image') + " | code") + " | adsklink", | ||
| block_formats: edx.StringUtils.interpolate( | ||
| gettext("{paragraph}=p;{preformatted}=pre;{heading3}=h3;{heading4}=h4;{heading5}=h5;{heading6}=h6"), | ||
| { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about a simpler, more upstreamable approach? let tinyMceArgs = {
script_url: baseUrl + "js/vendor/tinymce/js/tinymce/tinymce.full.min.js",
font_formats: _getFonts(),
theme: "modern",
...
};
// Allow customization of TinyMCE via the "HTML_TINYMCE_OVERRIDES" object, which can be set in
// ADDITIONAL_NODE_ENV_VARS in studio.yml:
if (process.env.ADDITIONAL_NODE_ENV_VARS) {
const tinyMceOverrides = JSON.parse(process.env.ADDITIONAL_NODE_ENV_VARS).HTML_TINYMCE_OVERRIDES;
if (tinyMceOverrides) {
if (tinyMceOverrides.toolbarExtra) {
tinyMceArgs.toolbar += tinyMceOverrides.toolbarExtra;
delete tinyMceOverrides.toolbarExtra;
}
tinyMceArgs = {...tinyMceArgs, ...tinyMceOverrides}
}
}
// Initialize TinyMCE
this.tiny_mce_textarea = $(".tiny-mce", this.element).tinymce(tinyMceArgs);Then |
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should put these into
lms.ymlandstudio.yml(probably via the EDXAPP_ENV_EXTRA ansible vars), not into a codebase fork.