-
Notifications
You must be signed in to change notification settings - Fork 480
Refactor: Block Editor #35257
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
Open
rjvelazco
wants to merge
48
commits into
main
Choose a base branch
from
refactor-dotcms-block-editor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Refactor: Block Editor #35257
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
6d1599a
feat(new-block-editor): add new block editor library with initial con…
rjvelazco 6b9eedc
refactor(Block Editor): update configuration and dependencies and add…
rjvelazco 7e193ef
feat(new-block-editor): add interaction preferences and upload placeh…
rjvelazco 9d014aa
fix(toolbar): change emoji picker trigger from click to mousedown event
rjvelazco 37a8a7e
fix(toolbar): prevent default behavior and close emoji picker if alre…
rjvelazco 3317167
feat: add contentlet node
rjvelazco a2553f1
refactor(new-block-editor): reorganize component structure and update…
rjvelazco c01e884
feat(new-block-editor): enhance slash menu functionality with improve…
rjvelazco 77fd1d1
feat(new-block-editor): add dotCMS image and video search functionali…
rjvelazco 0093e51
feat(new-block-editor): integrate PrimeNG DataView for image and vide…
rjvelazco cc9fe17
Merge branch 'main' into refactor-dotcms-block-editor
rjvelazco b783bc4
feat(new-block-editor): enhance editor functionality
rjvelazco 363f667
feat(new-block-editor): add text image wrap and image property
rjvelazco 2b72b03
feat(new-block-editor): enhance block editor with new grid functional…
rjvelazco bc10a12
feat(Block Edito): Grid block, Control Value Accesor, selected style …
rjvelazco bb9378d
refactor(new-block-editor): consolidate grid functionality into a sin…
rjvelazco 7defbd0
feat(new-block-editor): enhance editor with new porting checklist, im…
rjvelazco bc6d442
feat(new-block-editor): integrate language support and enhance conten…
rjvelazco f5cf57a
feat(new-block-editor): enhance editor with demo content and new tool…
rjvelazco 6dbdd61
docs(new-block-editor): add guidelines for immutable TipTap node name…
rjvelazco 50a6932
feat(new-block-editor): update styles and enhance media handling with…
rjvelazco 4417857
feat(new-block-editor): implement selection preservation feature duri…
rjvelazco e561e6e
refactor(settings): remove unused hooks and clean up configuration fo…
rjvelazco b4e066d
feat(new-block-editor): enhance image handling with improved data man…
rjvelazco 03fe36e
feat(new-block-editor): refactor dialog system for improved architect…
rjvelazco 93edb3b
fix(new-block-editor): clean up imports and enhance component structure
rjvelazco 714f4e3
refactor(new-block-editor): standardize node imports and improve code…
rjvelazco 88385c0
feat(new-block-editor): enhance video handling with additional metada…
rjvelazco a31d90a
Merge branch 'main' into refactor-dotcms-block-editor
rjvelazco 19a28e5
refactor(new-block-editor): update component imports and enhance styling
rjvelazco 454b451
feat(material-icons): introduce Material Symbols Outlined font and up…
rjvelazco 3b743e7
Merge branch 'main' into refactor-dotcms-block-editor
rjvelazco f32e8fd
feat(editor): enhance DotCMS editor with JSON handling and UI improve…
rjvelazco 46d3731
refactor(editor-dialog): enhance focus handling and simplify dialog c…
rjvelazco a261300
feat(editor): enhance contentlet handling with new data structure
rjvelazco 91cebde
feat(editor): refactor contentlet handling with new Angular node view
rjvelazco 8c4eea7
feat(editor): introduce new dialog components for enhanced media hand…
rjvelazco cfca7d3
feat(editor): add contentlet component for enhanced node view
rjvelazco b7a4de4
feat(editor): enhance slash menu with improved scrolling behavior
rjvelazco 7aa0da6
feat(editor): introduce AI content generation feature
rjvelazco 81a2430
feat(editor): implement block-target highlighting for toolbar interac…
rjvelazco 05109d3
refactor(editor): remove hardcoded base URL and authorization token
rjvelazco 6ad4d5d
feat(editor): enhance block gutter behavior with scroll handling
rjvelazco 8bf5b41
feat(editor): improve block gutter positioning with auto-update and e…
rjvelazco 983cf86
feat(editor): add Markdown copy and paste functionality
rjvelazco 18a1c52
Merge branch 'main' into refactor-dotcms-block-editor
rjvelazco 4e9c8d3
fix(editor): update panel class for fullscreen layout and add tooltip…
rjvelazco 0699a59
refactor(editor): enhance block gutter functionality with improved ev…
rjvelazco File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| <dot-block-editor /> | ||
| <dot-block-editor [value]="demoContent" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,16 @@ | ||
| import { Component } from '@angular/core'; | ||
|
|
||
| import { DotCMSEditorComponent } from '@dotcms/new-block-editor'; | ||
|
|
||
| import { EDITOR_DEMO_CONTENT } from './editor-demo-content'; | ||
|
|
||
| @Component({ | ||
| selector: 'dotcms-root', | ||
| templateUrl: './app.component.html', | ||
| styleUrls: [], | ||
| standalone: false | ||
| imports: [DotCMSEditorComponent], | ||
| standalone: true | ||
| }) | ||
| export class AppComponent { | ||
| title = 'dotcms-block-editor'; | ||
| protected readonly demoContent = EDITOR_DEMO_CONTENT; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import Lara from '@primeuix/themes/lara'; | ||
|
|
||
| import { provideHttpClient } from '@angular/common/http'; | ||
| import { ApplicationConfig, provideBrowserGlobalErrorListeners } from '@angular/core'; | ||
| import { provideAnimationsAsync } from '@angular/platform-browser/animations/async'; | ||
|
|
||
| import { providePrimeNG } from 'primeng/config'; | ||
|
|
||
| /** | ||
| * PrimeNG is required for components used inside `@dotcms/new-block-editor` (e.g. DataView in | ||
| * image/video dotCMS pickers). Theme + cssLayer order must match `apps/dotcms-block-editor/src/styles.css`. | ||
| */ | ||
| export const appConfig: ApplicationConfig = { | ||
| providers: [ | ||
| provideBrowserGlobalErrorListeners(), | ||
| provideHttpClient(), | ||
| provideAnimationsAsync(), | ||
| providePrimeNG({ | ||
| theme: { | ||
| preset: Lara, | ||
| options: { | ||
| darkModeSelector: '.dark' | ||
| } | ||
| } | ||
| }) | ||
| ] | ||
| }; |
This file was deleted.
Oops, something went wrong.
41 changes: 41 additions & 0 deletions
41
core-web/apps/dotcms-block-editor/src/app/editor-demo-content.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| /** Default HTML shown when the editor loads (demo / onboarding). */ | ||
| export const EDITOR_DEMO_CONTENT = ` | ||
| <h1>Block Editor</h1> | ||
| <p>Welcome! Type <strong>/</strong> anywhere to open the block menu and insert content.</p> | ||
|
|
||
| <h2>Text blocks</h2> | ||
| <p>Regular paragraph text. You can write <strong>bold</strong>, <em>italic</em>, and <code>inline code</code>.</p> | ||
| <blockquote><p>A blockquote stands out from the rest of the content — great for callouts or citations.</p></blockquote> | ||
| <pre><code>const greet = (name: string) => \`Hello, \${name}!\`; | ||
| console.log(greet('World'));</code></pre> | ||
|
|
||
| <h2>Lists</h2> | ||
| <ul> | ||
| <li>Bullet item one</li> | ||
| <li>Bullet item two</li> | ||
| <li>Bullet item three</li> | ||
| </ul> | ||
| <ol> | ||
| <li>First ordered item</li> | ||
| <li>Second ordered item</li> | ||
| <li>Third ordered item</li> | ||
| </ol> | ||
|
|
||
| <h2>Links</h2> | ||
| <p>Click once to select a link, double-click to edit it. Try it: <a href="https://tiptap.dev">Tiptap docs</a> or <a href="https://angular.dev">Angular docs</a>. You can also paste a URL directly and it will auto-link.</p> | ||
|
|
||
| <h2>Table</h2> | ||
| <table> | ||
| <thead> | ||
| <tr><th>Feature</th><th>Status</th><th>Notes</th></tr> | ||
| </thead> | ||
| <tbody> | ||
| <tr><td>Slash menu</td><td>✅ Done</td><td>Type / to trigger</td></tr> | ||
| <tr><td>Drag & drop</td><td>✅ Done</td><td>Grab the handle on the left</td></tr> | ||
| <tr><td>Tables</td><td>✅ Done</td><td>Resizable columns</td></tr> | ||
| <tr><td>Links</td><td>✅ Done</td><td>Autolink + dialog</td></tr> | ||
| <tr><td>Images</td><td>✅ Done</td><td>URL or file upload</td></tr> | ||
| <tr><td>Video</td><td>✅ Done</td><td>URL or file upload</td></tr> | ||
| </tbody> | ||
| </table> | ||
| `; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,12 @@ | ||
| import { enableProdMode } from '@angular/core'; | ||
| import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | ||
| import { bootstrapApplication } from '@angular/platform-browser'; | ||
|
|
||
| import { AppModule } from './app/app.module'; | ||
| import { AppComponent } from './app/app.component'; | ||
| import { appConfig } from './app/app.config'; | ||
| import { environment } from './environments/environment'; | ||
|
|
||
| if (environment.production) { | ||
| enableProdMode(); | ||
| } | ||
|
|
||
| platformBrowserDynamic() | ||
| .bootstrapModule(AppModule) | ||
| .catch((err) => console.error(err)); | ||
| bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,3 @@ | ||
| @import 'tailwindcss'; | ||
| @import 'tailwindcss-primeui'; | ||
|
|
||
| .p-dialog-mask.p-component-overlay.p-dialog-mask-scrollblocker { | ||
| background-color: transparent; | ||
| backdrop-filter: none; | ||
| } | ||
| @plugin "@tailwindcss/typography"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shared global
codeCSS removed affecting other consumersMedium Severity
The global
codeelement styling (color, background, padding, font-family, line-break) was removed from the sharedstyles.scssinlibs/dotcms-scss/angular/. This is a shared stylesheet imported by multiple applications, not just the block editor. Removing this rule may breakcodeelement rendering across all consuming apps that relied on this global style.Reviewed by Cursor Bugbot for commit 77fd1d1. Configure here.