Skip to content
Draft
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
5 changes: 5 additions & 0 deletions .env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ REACT_APP_RASTER_MAP_TILES=https://helsinki-maptiles.dev.hel.ninja/styles/hel-os
REACT_APP_HIGH_CONTRAST_RASTER_MAP_TILES=https://helsinki-maptiles.dev.hel.ninja/styles/turku-osm-high-contrast-pattern-{language}/{z}/{x}/{y}@2x.png
ENABLE_E2E_COVERAGE=false
GENERATE_SOURCEMAPS=false
# CKEditor 5 rich text editor. 'GPL' uses the free open-source build (shows a
# small "Powered by CKEditor" badge); set a commercial license key to remove it.
REACT_APP_CKEDITOR_LICENSE_KEY=GPL
# Backend endpoint for editor image uploads (relative to the API base).
REACT_APP_IMAGE_UPLOAD_ENDPOINT=/v1/image
34 changes: 31 additions & 3 deletions assets/sass/kerrokantasi/_hearing-form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,37 @@ div:has(> .hearing-form-child-modal) {
}

.rich-text-editor {
.DraftEditor-editorContainer {
border: 2px solid $black;
min-height: 90px;
margin-bottom: var(--spacing-s);

.rich-text-editor-extra-controls {
display: flex;
flex-wrap: wrap;
gap: var(--spacing-2-xs);
margin: var(--spacing-2-xs) 0;
}

.rich-text-editor-extra-button {
background: $gray-lighter;
border: 1px solid $black;
padding: 4px 10px;
cursor: pointer;
font-size: 0.875rem;
}

.ck-editor__editable {
min-height: 200px;
}

// Mirror the published-page styling for these block classes inside the editor.
.ck-content {
.lead {
font-weight: bold;
}

.image-caption {
font-size: 0.875rem;
font-style: italic;
}
}
}

Expand Down
10 changes: 2 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@
},
"dependencies": {
"@city-of-helsinki/react-helsinki-notification-manager": "^0.1.0",
"@draft-js-plugins/drag-n-drop": "^4.2.0",
"@draft-js-plugins/editor": "^4.1.0",
"@draft-js-plugins/focus": "^4.1.1",
"@draft-js-plugins/image": "^4.1.1",
"@draft-js-plugins/resizeable": "^5.0.4",
"@ckeditor/ckeditor5-react": "^11.2.0",
"@eslint/js": "^9.25.1",
"@formatjs/intl-relativetimeformat": "^11.2.14",
"@sentry/react": "^9.22.0",
Expand All @@ -56,12 +52,10 @@
"alertifyjs": "^1.13.1",
"bootstrap-sass": "3.4.3",
"browser-image-compression": "^2.0.2",
"ckeditor5": "^48.2.0",
"classnames": "^2.3.1",
"dompurify": "^3.4.0",
"dotenv": "^16.4.5",
"draft-convert": "^2.1.10",
"draft-js": "^0.11.7",
"draft-js-export-html": "^1.4.1",
"eslint": "^9.25.1",
"eslint-config-prettier": "^10.1.2",
"eslint-config-vitest-globals": "^2.0.2",
Expand Down
1,334 changes: 1,091 additions & 243 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

144 changes: 0 additions & 144 deletions src/components/RichTextEditor/EditorControls.jsx

This file was deleted.

20 changes: 0 additions & 20 deletions src/components/RichTextEditor/Iframe/IframeEntity.jsx

This file was deleted.

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions src/components/RichTextEditor/Image/ImageCaptionEntity.jsx

This file was deleted.

17 changes: 0 additions & 17 deletions src/components/RichTextEditor/Image/ImageEntity.jsx

This file was deleted.

Loading
Loading