Skip to content
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

feat: Add note editor plugins extensions - EXO-73170 - Meeds-io/MIPs#128 #41

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions commons-exo-extension/src/main/webapp/WEB-INF/gatein-resources.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,15 @@
<module>eXoVueI18n</module>
</depends>
</module>
<module>
<name>WYSIWYGPluginsExtensions</name>
<load-group>NotesEditorGRP</load-group>
<script>
<minify>false</minify>
<path>/js/WYSIWYGPluginsExtensions.bundle.js</path>
</script>
<depends>
<module>extensionRegistry</module>
</depends>
</module>
</gatein-resources>
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright (C) 2024 eXo Platform SAS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <gnu.org/licenses>.
*/

export function init() {
if (eXo.ecm) {
CKEDITOR.plugins.addExternal('uploadImage', '/eXoWCMResources/eXoPlugins/uploadImage/', 'plugin.js');
CKEDITOR.plugins.addExternal('selectImage', '/eXoWCMResources/eXoPlugins/selectImage/', 'plugin.js');

extensionRegistry.registerExtension('WYSIWYGPlugins', 'image', {
id: 'selectImage',
extraPlugin: 'selectImage',
extraToolbarItem: 'selectImage',
rank: 20,
});
}
}
1 change: 1 addition & 0 deletions commons-exo-extension/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const config = {
},
entry: {
eXoPlatformGamificationConnectorExtensions: './src/main/webapp/vue-app/gamification-connectorExtensions/extensions.js',
WYSIWYGPluginsExtensions: './src/main/webapp/vue-app/noteEditorPluginsExtensions/extensions.js'
},
output: {
path: path.join(__dirname, 'target/commons-exo-extension/'),
Expand Down