diff --git a/tinymce6-parent/tinymce6-examples/src/main/java/org/wicketstuff/examples/tinymce/TinyMCE6ExampleApplication.java b/tinymce6-parent/tinymce6-examples/src/main/java/org/wicketstuff/examples/tinymce/TinyMCE6ExampleApplication.java index 138d3645cf..430e8399ce 100644 --- a/tinymce6-parent/tinymce6-examples/src/main/java/org/wicketstuff/examples/tinymce/TinyMCE6ExampleApplication.java +++ b/tinymce6-parent/tinymce6-examples/src/main/java/org/wicketstuff/examples/tinymce/TinyMCE6ExampleApplication.java @@ -2,6 +2,8 @@ import org.apache.wicket.protocol.http.WebApplication; +import de.agilecoders.wicket.webjars.WicketWebjars; + /** * @author Iulian-Corneliu COSTAN */ @@ -16,6 +18,7 @@ public TinyMCE6ExampleApplication() protected void init() { super.init(); + WicketWebjars.install(this); getCspSettings().blocking().clear(); } diff --git a/tinymce6-parent/tinymce6/pom.xml b/tinymce6-parent/tinymce6/pom.xml index bf0f4f1ac1..cbf694d33e 100644 --- a/tinymce6-parent/tinymce6/pom.xml +++ b/tinymce6-parent/tinymce6/pom.xml @@ -29,6 +29,10 @@ + + de.agilecoders.wicket.webjars + wicket-webjars + org.webjars.npm tinymce diff --git a/tinymce6-parent/tinymce6/src/main/java/org/wicketstuff/tinymce6/settings/TinyMCESettings.java b/tinymce6-parent/tinymce6/src/main/java/org/wicketstuff/tinymce6/settings/TinyMCESettings.java index 9dad3ef5de..d941208075 100644 --- a/tinymce6-parent/tinymce6/src/main/java/org/wicketstuff/tinymce6/settings/TinyMCESettings.java +++ b/tinymce6-parent/tinymce6/src/main/java/org/wicketstuff/tinymce6/settings/TinyMCESettings.java @@ -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. @@ -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;