Skip to content

Commit

Permalink
IBX-7219: Fixed formatted focus (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
dew326 authored Feb 7, 2024
1 parent d84efc4 commit 59e7bc4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
import { toWidgetEditable } from '@ckeditor/ckeditor5-widget/src/utils';
import { rawSnippetTextToViewDocumentFragment } from '@ckeditor/ckeditor5-code-block/src/utils';
import UpcastWriter from '@ckeditor/ckeditor5-engine/src/view/upcastwriter';
import Widget from '@ckeditor/ckeditor5-widget/src/widget';
Expand Down Expand Up @@ -30,8 +29,7 @@ class IbexaFormattedEditing extends Plugin {

conversion.for('editingDowncast').elementToElement({
model: 'formatted',
view: (modelElement, { writer: downcastWriter }) =>
toWidgetEditable(downcastWriter.createEditableElement('pre'), downcastWriter),
view: (modelElement, { writer: downcastWriter }) => downcastWriter.createContainerElement('pre'),
});

conversion.for('dataDowncast').elementToElement({
Expand Down
6 changes: 6 additions & 0 deletions src/bundle/Resources/public/scss/_general.scss
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,12 @@
min-height: calculateRem(20px);
}

pre {
border: calculateRem(1px) solid $ibexa-color-dark-200;
border-radius: $ibexa-border-radius;
padding: calculateRem(4px) calculateRem(8px);
}

[id]:not(.ibexa-data-source__richtext) {
position: relative;

Expand Down

0 comments on commit 59e7bc4

Please sign in to comment.