Skip to content

Commit

Permalink
XWIKI-22128: Enable realtime editing for the WYSIWYG editor by default
Browse files Browse the repository at this point in the history
  • Loading branch information
mflorea committed Oct 17, 2024
1 parent cea21f9 commit bbce624
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<artifactId>xwiki-platform-realtime-wysiwyg-webjar</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
<!-- Marked as optional because the realtime plugin is disabled by default. -->
<!-- Marked as optional to allow disabling and uninstalling the realtime editing feature.. -->
<optional>true</optional>
</dependency>
<!-- This is used by the resource suggest picker on the link modal. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
<version>${project.version}</version>
<scope>runtime</scope>
<type>xar</type>
<!-- Marked as optional because realtime editing is currently disabled by default. -->
<!-- Marked as optional to allow disabling and uninstalling the realtime editing feature. -->
<optional>true</optional>
</dependency>
<!-- Test dependencies. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ CKEDITOR.editorConfig = function(config) {
'officeImporter,xwiki-macro',
// We remove the default sourcearea plugin because we use our own xwiki-sourcearea plugin which supports switching
// to Source while editing in-place. We still bundle the sourcearea plugin because we reuse its icons and
// translations. We remove the realtime plugin by default because it's unstable.
removePlugins: 'bidi,colorbutton,font,justify,save,sourcearea,xwiki-realtime',
// translations.
removePlugins: 'bidi,colorbutton,font,justify,save,sourcearea',
toolbarGroups: [
{name: 'format'},
{name: 'basicstyles', groups: ['basicstyles', 'cleanup']},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@
<scope>runtime</scope>
<type>xar</type>
</dependency>
<!-- We need this for the WYSIWYG editor administration section where we set the default WYSIWYG editor. -->
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-wysiwyg-ui</artifactId>
<version>${project.version}</version>
<type>xar</type>
</dependency>
<!-- The JavaScript code needs to display localized messages and for this it needs to fetch them through REST so we
need an implementation of the localization REST API. -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,9 @@
*/
package org.xwiki.realtime.wysiwyg.test.ui;

import java.util.ArrayList;
import java.util.List;

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.extension.ExtendWith;
import org.xwiki.ckeditor.test.po.CKEditorConfigurationPane;
import org.xwiki.ckeditor.test.ui.AbstractCKEditorIT;
import org.xwiki.test.docker.junit5.MultiUserTestUtils;
import org.xwiki.test.docker.junit5.TestReference;
Expand All @@ -44,13 +40,6 @@ abstract class AbstractRealtimeWYSIWYGEditorIT extends AbstractCKEditorIT
@BeforeAll
static void beforeAll(TestUtils setup)
{
// Enable the real-time WYSIWYG editor.
setup.loginAsSuperAdmin();
CKEditorConfigurationPane ckeditorConfig = CKEditorConfigurationPane.open();
List<String> disabledPlugins = new ArrayList<>(ckeditorConfig.getDisabledPlugins());
disabledPlugins.remove("xwiki-realtime");
ckeditorConfig.setDisabledPlugins(disabledPlugins).clickSave();

// Test with a simple user.
setup.createUserAndLogin("John", "pass", "editor", "Wysiwyg");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,30 +30,7 @@
* @since 15.5.4
* @since 15.9
*/
@UITest(
properties = {
"xwikiDbHbmCommonExtraMappings=notification-filter-preferences.hbm.xml",
// Required to upload files during the real-time editing session.
"xwikiCfgPlugins=com.xpn.xwiki.plugin.fileupload.FileUploadPlugin"
},
extraJARs = {
// The WebSocket end-point implementation based on XWiki components needs to be installed as core extension.
"org.xwiki.platform:xwiki-platform-websocket",

// It's currently not possible to install a JAR contributing a Hibernate mapping file as an Extension. Thus
// we need to provide the JAR inside WEB-INF/lib. See https://jira.xwiki.org/browse/XWIKI-8271
"org.xwiki.platform:xwiki-platform-notifications-filters-default",

// The macro service uses the extension index script service to get the list of uninstalled macros (from
// extensions) which expects an implementation of the extension index. The extension index script service is a
// core extension so we need to make the extension index also core.
"org.xwiki.platform:xwiki-platform-extension-index",

// Solr search is used to get suggestions for the link quick action.
"org.xwiki.platform:xwiki-platform-search-solr-query"
},
servletEngineNetworkAliases = RealtimeWYSIWYGEditorIT.XWIKI_ALIAS
)
@UITest
class AllIT
{
@Nested
Expand Down

0 comments on commit bbce624

Please sign in to comment.