Skip to content

Commit

Permalink
feat: Add note editor plugins extentions - EXO-73170 - Meeds-io/MIPs#128
Browse files Browse the repository at this point in the history
  • Loading branch information
sofyenne committed Jul 17, 2024
1 parent c0e3839 commit 3c11e10
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
27 changes: 27 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,31 @@
<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>vue</module>
</depends>
<depends>
<module>eXoVueI18n</module>
</depends>
<depends>
<module>vuetify</module>
</depends>
<depends>
<module>jquery</module>
<as>$</as>
</depends>
<depends>
<module>extensionRegistry</module>
</depends>
<depends>
<module>commonVueComponents</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

0 comments on commit 3c11e10

Please sign in to comment.