Bladeren bron

Change manual test.

panr 5 jaren geleden
bovenliggende
commit
e51d83e50c

+ 3 - 3
packages/ckeditor5-link/tests/manual/protocol.html

@@ -37,16 +37,16 @@
 
 <h2>The default configuration for the link protocol has been set to <code id="default-protocol"></code>.</h2>
 
-<h3>...but you can change it:</h3>
+<h3>...but you can dynamically change it:</h3>
 <form id="protocol-settings" style="margin: 20px 0;">
+	<label for="none"><input type="radio" name="option" id="none" value="none" />DISABLE FEATURE</label>
 	<label for="http"><input type="radio" name="option" id="http" value="http://" />HTTP</label>
 	<label for="https"><input type="radio" name="option" id="https" value="https://" />HTTPS</label>
 	<label for="mailto"><input type="radio" name="option" id="mailto" value="mailto:" />MAILTO</label>
-	<label for="file"><input type="radio" name="option" id="file" value="file://" />FILE</label>
 </form>
 
 <div id="editor">
 	<p>This is <a href="http://ckeditor.com">CKEditor5</a> from <a href="http://cksource.com">CKSource</a>. If you need more information please contact us at support@example.com <sup class="indicator">[1]</sup>.</p>
 </div>
 
-<p><sup>[1]</sup> Copy the email address and create a link with it (<code>mailto:</code> protocol will be added automatically).</p>
+<p><sup>[1]</sup><strong>When feature enabled:</strong> copy the email address and create a link with it (<code>mailto:</code> protocol will be added automatically).</p>

+ 2 - 2
packages/ckeditor5-link/tests/manual/protocol.js

@@ -37,10 +37,10 @@ ClassicEditor
 			radio.addEventListener( 'click', ( {
 				target: { value: protocol }
 			} ) => {
-				editor.config.set( 'link.defaultProtocol', protocol );
+				editor.config.set( 'link.defaultProtocol', protocol === 'none' ? undefined : protocol );
 
 				// Change input placeholder just for manual test's case to provide more dynamic behavior.
-				formView.urlInputView.fieldView.placeholder = protocol + 'example.com';
+				formView.urlInputView.fieldView.placeholder = protocol === 'none' ? 'https://example.com' : protocol + 'example.com';
 			} );
 		} );
 	} )