Other
CKEditor5

the border arounded the image
No border
@qiaqiaxian AFAIK there is no direct solution but you can style the editing area by yourself.
When toogling read only mode add some class, ie off to the editing container and disable outline on <figure> in your CSS:
.ck.off figure.image,
.ck.off figure.image:hover {
outline: none;
}
@oleq / @Reinmar: I've checked this and the editor does not set any CSS class on the editing area. Maybe we should add something in the read only mode so the developers could change CSS (i.e. gray out text)?
☝️ Good point @jodator, by default we should toggle class in the read-only mode.
Anyway, there is a custom property for selected widget, so here is better solution:
.ck-read-only {
--ck-widget-outline-thickness: 0;
}
@oleq / @Reinmar: I've checked this and the editor does not set any CSS class on the editing area. Maybe we should add something in the read only mode so the developers could change CSS (i.e. gray out text)?
Definitely a good idea. Also, why aren't we disabling that outline in the read-only mode? :D
@jodator @dkonopka thx, both nice work!
@Reinmar i agree with @jodator 's idea, maybe add some configs ?
Most helpful comment
Definitely a good idea. Also, why aren't we disabling that outline in the read-only mode? :D