8
0
Просмотр исходного кода

Update visuals styles for the manual tests model contents.

Maciej Gołaszewski 6 лет назад
Родитель
Сommit
c4aff0bb6d

+ 5 - 1
packages/ckeditor5-table/tests/manual/tableselection.html

@@ -3,6 +3,10 @@
 		font-family: Helvetica, Arial, sans-serif;
 		font-size: 14px;
 	}
+
+	.print-selected {
+		background: #b8e3ff;
+	}
 </style>
 
 <div id="editor">
@@ -50,4 +54,4 @@
 	</table>
 </div>
 <h2>Model contents:</h2>
-<div id="model"></div>
+<pre><code id="model"></code></pre>

+ 8 - 4
packages/ckeditor5-table/tests/manual/tableselection.js

@@ -41,13 +41,14 @@ function printModelContents( editor ) {
 		.replace( /</g, '&lt;' )
 		.replace( />/g, '&gt;' )
 		.replace( /\n/g, '<br>' )
-		.replace( /\[/g, '<strong>[' )
-		.replace( /]/g, ']</strong>' );
+		.replace( /\[/g, '<span class="print-selected">[' )
+		.replace( /]/g, ']</span>' );
 }
 
 function formatTable( tableString ) {
 	return tableString
-		.replace( /<table>/g, '\n<table>' )
+		.replace( /<table>/g, '\n<table' )
+		.replace( /<table /g, '\n<table ' )
 		.replace( /<tableRow>/g, '\n<tableRow>\n    ' )
 		.replace( /<thead>/g, '\n<thead>\n    ' )
 		.replace( /<tbody>/g, '\n<tbody>\n    ' )
@@ -56,5 +57,8 @@ function formatTable( tableString ) {
 		.replace( /<\/thead>/g, '\n</thead>' )
 		.replace( /<\/tbody>/g, '\n</tbody>' )
 		.replace( /<\/tr>/g, '\n</tr>' )
-		.replace( /<\/table>/g, '\n</table>' );
+		.replace( /<\/table>/g, '\n</table>' )
+		.replace( /tableCell/g, 'cell' )
+		.replace( /tableRow/g, 'row' )
+		.replace( /paragraph/g, 'p' );
 }