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

feat(Edit Contentlet): Make our dotAddImage custom plugins for TinyMCE work in Angular #27982

Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
8469d48
feat: setup custom plugin
rjvelazco Mar 15, 2024
204960e
Merge branch 'master' into issue-27969-edit-contentlet-make-our-doted…
fmontes Mar 15, 2024
8b89244
chore: move DotAssetSearchComponent to ui lib
rjvelazco Mar 18, 2024
13e6736
feat: let user add images from dotCMS
rjvelazco Mar 18, 2024
b83a7c0
chore: create WYSIWYS Plugins service
rjvelazco Mar 19, 2024
fcccf32
chore: clean up
rjvelazco Mar 19, 2024
3c44f52
chore: add button icon
rjvelazco Mar 19, 2024
da8894f
Merge branch 'master' into issue-27969-edit-contentlet-make-our-doted…
rjvelazco Mar 19, 2024
2471b19
Merge branch 'issue-27969-edit-contentlet-make-our-doteditimage-custo…
rjvelazco Mar 19, 2024
8420b28
chore: allow user to drop images
rjvelazco Mar 19, 2024
984bd87
feat: add dot Image data attributes
rjvelazco Mar 19, 2024
36845e9
chore: fix tests
rjvelazco Mar 20, 2024
46f6806
chore: cover DotWYSIWYGField Component tests
rjvelazco Mar 20, 2024
ed28bc7
chore: cover DotWysiwygPlugin Service tests
rjvelazco Mar 20, 2024
1d628e5
chore: cover formatDotImageNode Util tests
rjvelazco Mar 20, 2024
f89704f
chore: clean up
rjvelazco Mar 20, 2024
618f550
Merge branch 'master' into issue-27969-edit-contentlet-make-our-doted…
rjvelazco Mar 20, 2024
9015ca7
Merge branch 'master' into issue-27969-edit-contentlet-make-our-doted…
rjvelazco Mar 21, 2024
7ada9f1
chore: cover DotContentSearch Service tests
rjvelazco Mar 21, 2024
726df38
fix: lint
rjvelazco Mar 21, 2024
3b4ff41
chore: fix import in DotBlockEditor Component
rjvelazco Mar 21, 2024
fab4272
chore: add context menu for images
rjvelazco Mar 21, 2024
99b5c48
chore: rename component to DotEditContentWYSIWYGField
rjvelazco Mar 21, 2024
c4e6776
chore: clean up
rjvelazco Mar 21, 2024
ba0646b
chore: clean up
rjvelazco Mar 21, 2024
9923791
chore: cover DotAssetSearchComponent tests
rjvelazco Mar 21, 2024
74d3e1d
chore: cover DotAssetSearchStore tests
rjvelazco Mar 22, 2024
0cef970
chore: cover DotAssetSearchDialog Component tests
rjvelazco Mar 22, 2024
da10072
chore: clean up
rjvelazco Mar 22, 2024
2d57e3f
Merge branch 'master' into issue-27969-edit-contentlet-make-our-doted…
rjvelazco Mar 22, 2024
f22f449
chore: feedback
rjvelazco Mar 22, 2024
7df4263
Merge branch 'issue-27969-edit-contentlet-make-our-doteditimage-custo…
rjvelazco Mar 22, 2024
5ed37ce
chore: code cleanup
rjvelazco Mar 22, 2024
478d166
Merge branch 'master' into issue-27969-edit-contentlet-make-our-doted…
rjvelazco Mar 22, 2024
e2b6794
Merge branch 'master' into issue-27969-edit-contentlet-make-our-doted…
rjvelazco Mar 25, 2024
073ea0a
Merge branch 'issue-27969-edit-contentlet-make-our-doteditimage-custo…
rjvelazco Mar 25, 2024
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
12 changes: 9 additions & 3 deletions core-web/apps/dotcms-block-editor/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ import { ListboxModule } from 'primeng/listbox';
import { OrderListModule } from 'primeng/orderlist';

import { BlockEditorModule, DotBlockEditorComponent } from '@dotcms/block-editor';
import { DotPropertiesService } from '@dotcms/data-access';
import {
DotPropertiesService,
DotContentSearchService,
DotLanguagesService
} from '@dotcms/data-access';
import { DotAssetSearchComponent } from '@dotcms/ui';

import { AppComponent } from './app.component';

Expand All @@ -24,9 +29,10 @@ import { AppComponent } from './app.component';
BlockEditorModule,
OrderListModule,
ListboxModule,
HttpClientModule
HttpClientModule,
DotAssetSearchComponent
],
providers: [DotPropertiesService]
providers: [DotPropertiesService, DotContentSearchService, DotLanguagesService]
rjvelazco marked this conversation as resolved.
Show resolved Hide resolved
})
export class AppModule implements DoBootstrap {
constructor(private injector: Injector) {}
Expand Down
18 changes: 14 additions & 4 deletions core-web/libs/block-editor/src/lib/block-editor.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { ConfirmationService } from 'primeng/api';
import { ConfirmDialogModule } from 'primeng/confirmdialog';

import { DotMessageService } from '@dotcms/data-access';
import {
DotContentSearchService,
DotLanguagesService,
DotMessageService,
DotPropertiesService,
DotUploadFileService
} from '@dotcms/data-access';
import { LoggerService, StringUtils } from '@dotcms/dotcms-js';
import { DotFieldRequiredDirective, DotMessagePipe } from '@dotcms/ui';
import { DotAssetSearchComponent, DotFieldRequiredDirective, DotMessagePipe } from '@dotcms/ui';

//Editor
import { DotBlockEditorComponent } from './components/dot-block-editor/dot-block-editor.component';
Expand All @@ -29,7 +35,7 @@ import {
} from './extensions';
import { AssetFormModule } from './extensions/asset-form/asset-form.module';
import { ContentletBlockComponent } from './nodes';
import { DotAiService, DotUploadFileService, EditorDirective } from './shared';
import { DotAiService, EditorDirective } from './shared';
import { PrimengModule } from './shared/primeng.module';
import { SharedModule } from './shared/shared.module';

Expand All @@ -49,7 +55,8 @@ const initTranslations = (dotMessageService: DotMessageService) => {
UploadPlaceholderComponent,
DotMessagePipe,
ConfirmDialogModule,
AIImagePromptComponent
AIImagePromptComponent,
DotAssetSearchComponent
],
declarations: [
EditorDirective,
Expand All @@ -73,6 +80,9 @@ const initTranslations = (dotMessageService: DotMessageService) => {
StringUtils,
DotAiService,
ConfirmationService,
DotPropertiesService,
DotContentSearchService,
DotLanguagesService,
{
provide: APP_INITIALIZER,
useFactory: initTranslations,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import { OrderListModule } from 'primeng/orderlist';

import { debounceTime, delay, tap } from 'rxjs/operators';

import { DotMessageService, DotPropertiesService } from '@dotcms/data-access';
import { DotMessageService, DotPropertiesService, DotUploadFileService } from '@dotcms/data-access';
import { DotContentSearchService, DotLanguageService } from '@dotcms/ui';

import { DotBlockEditorComponent } from './dot-block-editor.component';

Expand All @@ -26,10 +27,7 @@ import {
ASSET_MOCK,
CONTENTLETS_MOCK,
DotAiService,
DotLanguageService,
DotUploadFileService,
FileStatus,
SearchService,
SuggestionsComponent,
SuggestionsService
} from '../../shared';
Expand Down Expand Up @@ -170,7 +168,7 @@ export const Primary = () => ({
}
},
{
provide: SearchService,
provide: DotContentSearchService,
useValue: {
get(params) {
const query = params.query.match(new RegExp(/(?<=:)(.*?)(?=\*)/))[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@
.p-tabview-panel {
height: 25rem;
}

.p-tabview-panels {
padding: 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,32 @@ import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';

import { DotSpinnerModule } from '@dotcms/ui';
import { DotUploadFileService } from '@dotcms/data-access';
import { DotAssetSearchComponent, DotSpinnerModule } from '@dotcms/ui';

import { AssetFormComponent } from './asset-form.component';
import { DotAssetCardComponent } from './components/dot-asset-search/components/dot-asset-card/dot-asset-card.component';
import { DotAssetCardListComponent } from './components/dot-asset-search/components/dot-asset-card-list/dot-asset-card-list.component';
import { DotAssetCardSkeletonComponent } from './components/dot-asset-search/components/dot-asset-card-skeleton/dot-asset-card-skeleton.component';
import { DotAssetSearchComponent } from './components/dot-asset-search/dot-asset-search.component';
import { DotExternalAssetComponent } from './components/dot-external-asset/dot-external-asset.component';
import { DotAssetPreviewComponent } from './components/dot-upload-asset/components/dot-asset-preview/dot-asset-preview.component';
import { DotUploadAssetComponent } from './components/dot-upload-asset/dot-upload-asset.component';

import { DotUploadFileService } from '../../shared';
import { PrimengModule } from '../../shared/primeng.module';

@NgModule({
imports: [CommonModule, FormsModule, ReactiveFormsModule, DotSpinnerModule, PrimengModule],
imports: [
CommonModule,
FormsModule,
ReactiveFormsModule,
DotSpinnerModule,
PrimengModule,
DotAssetSearchComponent
],
declarations: [
AssetFormComponent,
DotAssetCardListComponent,
DotAssetCardComponent,
DotAssetCardSkeletonComponent,
DotExternalAssetComponent,
DotAssetSearchComponent,
DotUploadAssetComponent,
DotAssetPreviewComponent
],
providers: [DotUploadFileService],
exports: [AssetFormComponent, DotAssetSearchComponent]
exports: [AssetFormComponent]
})
export class AssetFormModule {}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading