Kaynağa Gözat

Finally look.

Kamil Piechaczek 5 yıl önce
ebeveyn
işleme
a3afe7781a

+ 1 - 1
packages/ckeditor5-html-embed/src/htmlembedediting.js

@@ -141,7 +141,6 @@ export default class HtmlEmbedEditing extends Plugin {
 				const textareaAttributes = {
 					placeholder,
 					disabled: true,
-					readonly: editor.isReadOnly,
 					class: 'ck ck-input ck-input-text raw-html__source'
 				};
 
@@ -151,6 +150,7 @@ export default class HtmlEmbedEditing extends Plugin {
 
 					writer.setCustomProperty( 'domElement', root, sourceElement );
 					root.value = modelElement.getAttribute( 'value' ) || '';
+					root.readOnly = editor.isReadOnly;
 
 					root.addEventListener( 'input', () => {
 						editor.execute( 'htmlEmbedUpdate', root.value );

+ 5 - 2
packages/ckeditor5-theme-lark/theme/ckeditor5-html-embed/htmlembed.css

@@ -7,6 +7,7 @@
 	/* The feature container. */
 	& .raw-html {
 		position: relative;
+		font-size: var(--ck-font-size-base);
 		padding: var(--ck-spacing-standard);
 
 		/* The switch mode button. */
@@ -22,8 +23,9 @@
 
 		/* The edit source element. */
 		& .raw-html__source {
-			width: calc(100% - 37px - 3 * var(--ck-spacing-standard));
+			box-sizing: border-box;
 			height: 10em;
+			width: calc(100% - 1.5 * var(--ck-icon-size));
 			resize: none;
 		}
 	}
@@ -32,7 +34,8 @@
 	& .raw-html--preview-enabled {
 		/* The preview data container. */
 		& .raw-html__preview {
-			width: calc(100% - 37px - var(--ck-spacing-standard));
+			box-sizing: border-box;
+			width: calc(100% - 1.5 * var(--ck-icon-size));
 			text-align: center;
 
 			& > table {