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

Missing styles in RichText for images #608 #609

Merged
merged 1 commit into from
Nov 7, 2023
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
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
group=com.enonic.app
projectName=guillotine
appName=com.enonic.app.guillotine
xpVersion=7.12.1
xpVersion=7.14.0-SNAPSHOT
version=7.0.0-SNAPSHOT

11 changes: 10 additions & 1 deletion src/main/java/com/enonic/app/guillotine/ServiceFacade.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.enonic.xp.portal.url.PortalUrlService;
import com.enonic.xp.schema.content.ContentTypeService;
import com.enonic.xp.schema.mixin.MixinService;
import com.enonic.xp.style.StyleDescriptorService;

@Component(immediate = true, service = ServiceFacade.class)
public class ServiceFacade
Expand All @@ -35,13 +36,16 @@

private final PageTemplateService pageTemplateService;

private final StyleDescriptorService styleDescriptorService;

@Activate
public ServiceFacade( final @Reference ContentService contentService, final @Reference ContentTypeService contentTypeService,
final @Reference ComponentDescriptorService componentDescriptorService,
final @Reference PortalUrlService portalUrlService, final @Reference NodeService nodeService,
final @Reference MixinService mixinService, final @Reference MacroService macroService,
final @Reference MacroDescriptorService macroDescriptorService,
final @Reference PageTemplateService pageTemplateService )
final @Reference PageTemplateService pageTemplateService,
final @Reference StyleDescriptorService styleDescriptorService )
{
this.contentService = contentService;
this.contentTypeService = contentTypeService;
Expand All @@ -52,6 +56,7 @@
this.macroService = macroService;
this.macroDescriptorService = macroDescriptorService;
this.pageTemplateService = pageTemplateService;
this.styleDescriptorService = styleDescriptorService;

Check warning on line 59 in src/main/java/com/enonic/app/guillotine/ServiceFacade.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/com/enonic/app/guillotine/ServiceFacade.java#L59

Added line #L59 was not covered by tests
}

public ContentService getContentService()
Expand Down Expand Up @@ -99,4 +104,8 @@
return pageTemplateService;
}

public StyleDescriptorService getStyleDescriptorService()
{
return styleDescriptorService;

Check warning on line 109 in src/main/java/com/enonic/app/guillotine/ServiceFacade.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/com/enonic/app/guillotine/ServiceFacade.java#L109

Added line #L109 was not covered by tests
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public Object get( final DataFetchingEnvironment environment )
Map<String, MacroDescriptor> registeredMacros = guillotineContext.getMacroDecorators();

htmlParams.processMacros( false );
htmlParams.customStyleDescriptorsCallback( () -> serviceFacade.getStyleDescriptorService().getAll() );
htmlParams.customHtmlProcessor( processor -> {
processor.processDefault( new CustomHtmlPostProcessor( links, images ) );

Expand Down
Loading