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

Updated the classic build to showcase the feature.

Aleksander Nowodzinski 5 лет назад
Родитель
Сommit
ab1b9d0c63

+ 25 - 8
packages/ckeditor5-build-classic/sample/index.html

@@ -12,18 +12,35 @@
 </head>
 <body>
 
-<h1>CKEditor 5 – classic editor build – development sample</h1>
+<h1>CKEditor 5 – accessible form fields – development sample</h1>
 
 <div id="editor">
 	<h2>Sample</h2>
-
-	<p>This is an instance of the <a href="https://ckeditor.com/docs/ckeditor5/latest/builds/guides/overview.html#classic-editor">classic editor build</a>.</p>
-
-	<figure class="image">
-		<img src="../tests/manual/sample.jpg" alt="Autumn fields" />
+	<p>Go and checkout the <a
+			href="https://ckeditor.com/docs/ckeditor5/latest/builds/guides/overview.html#classic-editor">link insertion
+			form</a>.</p>
+	<figure class="table" style="width:350px;">
+		<table
+			style="background-color:hsl(0, 0%, 90%);border-bottom:2px solid hsl(0, 0%, 60%);border-left:2px solid hsl(0, 0%, 60%);border-right:2px solid hsl(0, 0%, 60%);border-top:2px solid hsl(0, 0%, 60%);">
+			<tbody>
+				<tr>
+					<td>A</td>
+					<td
+						style="background-color:hsl(30, 75%, 60%);border-bottom:3px dashed hsl(0, 0%, 0%);border-left:3px dashed hsl(0, 0%, 0%);border-right:3px dashed hsl(0, 0%, 0%);border-top:3px dashed hsl(0, 0%, 0%);">
+						table</td>
+					<td>to</td>
+				</tr>
+				<tr>
+					<td>test&nbsp;</td>
+					<td>properties</td>
+					<td>forms</td>
+				</tr>
+			</tbody>
+		</table>
+	</figure>
+	<figure class="image image-style-side"><img src="../tests/manual/sample.jpg" alt="Autumn fields">
+		<figcaption>An image to test the text alternative form.</figcaption>
 	</figure>
-
-	<p>You can use this sample to validate whether your <a href="https://ckeditor.com/docs/ckeditor5/latest/builds/guides/development/custom-builds.html">custom build</a> works fine.</p>
 </div>
 
 <script src="../build/ckeditor.js"></script>

+ 13 - 2
packages/ckeditor5-build-classic/src/ckeditor.js

@@ -28,6 +28,8 @@ import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
 import PasteFromOffice from '@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice';
 import Table from '@ckeditor/ckeditor5-table/src/table';
 import TableToolbar from '@ckeditor/ckeditor5-table/src/tabletoolbar';
+import TableProperties from '@ckeditor/ckeditor5-table/src/tableproperties';
+import TableCellProperties from '@ckeditor/ckeditor5-table/src/tablecellproperties';
 import TextTransformation from '@ckeditor/ckeditor5-typing/src/texttransformation';
 
 export default class ClassicEditor extends ClassicEditorBase {}
@@ -55,6 +57,8 @@ ClassicEditor.builtinPlugins = [
 	Paragraph,
 	PasteFromOffice,
 	Table,
+	TableProperties,
+	TableCellProperties,
 	TableToolbar,
 	TextTransformation
 ];
@@ -88,13 +92,20 @@ ClassicEditor.defaultConfig = {
 			'imageStyle:side',
 			'|',
 			'imageTextAlternative'
-		]
+		],
+		upload: {
+			panel: {
+				items: [ 'insertImageViaUrl' ]
+			}
+		}
 	},
 	table: {
 		contentToolbar: [
 			'tableColumn',
 			'tableRow',
-			'mergeTableCells'
+			'mergeTableCells',
+			'tableProperties',
+			'tableCellProperties'
 		]
 	},
 	// This value must be kept in sync with the language defined in webpack.config.js.