Skip to content

Commit

Permalink
Fixes ##1053: Webjars resources are being loaded as expected
Browse files Browse the repository at this point in the history
  • Loading branch information
solomax committed Dec 3, 2024
1 parent 720a3c8 commit 162501f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import org.apache.wicket.protocol.http.WebApplication;

import de.agilecoders.wicket.webjars.WicketWebjars;

/**
* @author Iulian-Corneliu COSTAN
*/
Expand All @@ -16,6 +18,7 @@ public TinyMCE6ExampleApplication()
protected void init()
{
super.init();
WicketWebjars.install(this);

getCspSettings().blocking().clear();
}
Expand Down
4 changes: 4 additions & 0 deletions tinymce6-parent/tinymce6/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
</description>

<dependencies>
<dependency>
<groupId>de.agilecoders.wicket.webjars</groupId>
<artifactId>wicket-webjars</artifactId>
</dependency>
<dependency>
<groupId>org.webjars.npm</groupId>
<artifactId>tinymce</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ License, or (at your option) any later version.
import org.slf4j.LoggerFactory;
import org.wicketstuff.tinymce6.TinyMceBehavior;

import de.agilecoders.wicket.webjars.request.resource.WebjarsJavaScriptResourceReference;

/**
* Settings class for TinyMCE editor. User can add/remove buttons, enable/disable resizing, change
* positions, orientation, alignment and much more.
Expand All @@ -49,10 +51,8 @@ public class TinyMCESettings implements Serializable
private static final Logger LOG = LoggerFactory.getLogger(TinyMCESettings.class);
private static final String NEWLINE_TAB = "\n\t";

public static final ResourceReference TINYMCE_JS_REF = new JavaScriptResourceReference(
TinyMceBehavior.class, "../../../webjars/tinymce/current/tinymce.js");
public static final ResourceReference TINYMCE_JS_REF_MIN = new JavaScriptResourceReference(
TinyMceBehavior.class, "../../../webjars/tinymce/current/tinymce.min.js");
public static final ResourceReference TINYMCE_JS_REF = new WebjarsJavaScriptResourceReference("tinymce/current/tinymce.js");
public static final ResourceReference TINYMCE_JS_REF_MIN = new WebjarsJavaScriptResourceReference("tinymce/current/tinymce.min.js");

private final Language language;
private boolean resizing = false;
Expand Down

0 comments on commit 162501f

Please sign in to comment.