This repository has been archived by the owner on Jun 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #195 from ckeditor/t/189
Fix: Buttons should override the `-webkit-appearance` property to work in the Bootstrap 4 environment. Closes #189.
- Loading branch information
Showing
7 changed files
with
137 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<h2>Plain editor</h2> | ||
<div id="editor"> | ||
<p>Content of <a href="https://ckeditor.com">the editor</a>.</p> | ||
</div> | ||
|
||
<h2>Editor in a bootstrap modal</h2> | ||
<iframe src="assets/iframe-content.html"></iframe> | ||
|
||
<style> | ||
iframe { | ||
width: 100%; | ||
height: 300px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
*/ | ||
|
||
/* globals document, window, console */ | ||
|
||
import BalloonEditor from '@ckeditor/ckeditor5-editor-balloon/src/ballooneditor'; | ||
import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset'; | ||
|
||
BalloonEditor | ||
.create( document.querySelector( '#editor' ), { | ||
plugins: [ ArticlePluginSet ], | ||
toolbar: [ 'bold', 'link' ] | ||
} ) | ||
.then( editor => { | ||
window.editor = editor; | ||
} ) | ||
.catch( err => { | ||
console.error( err.stack ); | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
## The -webkit-appearance of the buttons in the Bootstrap 4 modal [#189](https://github.com/ckeditor/ckeditor5-theme-lark/issues/189) | ||
|
||
1. Click the link in the content of the **plain editor**. | ||
2. Click the link in the content of the **editor inside the bootstrap modal**. | ||
3. In both cases, the link editing UI should show up. | ||
|
||
**Expected** | ||
|
||
In both cases, all buttons (including the link preview) should look **exactly the same**. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<div class="container h-100"> | ||
<div class="row h-100 justify-content-center align-items-center"> | ||
<div class="modal fade" id="modal" tabindex="-1" role="dialog" aria-labelledby="modal" aria-hidden="true"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
A Bootstrap 4 modal with the BalloonEditor instance | ||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | ||
</div> | ||
<div class="modal-body"> | ||
<div id="editor"> | ||
<p>Content of <a href="https://ckeditor.com">the editor</a>.</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div id="info"> | ||
There is nothing to do here as it is just a sub-component of another test. | ||
<br/> | ||
<a href="../1.html">Click here to continue testing</a>. | ||
</div> | ||
|
||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" /> | ||
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" ></script> | ||
<script src="https://unpkg.com/popper.js" ></script> | ||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" ></script> | ||
|
||
<style> | ||
:root { | ||
--ck-z-default: 100; | ||
} | ||
|
||
html, body { | ||
height: 100%; | ||
} | ||
|
||
.manual-test-sidebar { | ||
display: none; | ||
} | ||
|
||
.manual-test-container { | ||
padding-left: 0; | ||
padding-right: 0; | ||
} | ||
|
||
#info { | ||
position: fixed; | ||
top: 50%; | ||
left: 50%; | ||
transform: translateX( -50% ); | ||
display: none; | ||
} | ||
</style> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
*/ | ||
|
||
/* globals document, window, console, $ */ | ||
|
||
import BalloonEditor from '@ckeditor/ckeditor5-editor-balloon/src/ballooneditor'; | ||
import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset'; | ||
|
||
// Display an info when this file is ran as a standalone test. | ||
if ( window.top === window ) { | ||
document.getElementById( 'info' ).style.display = 'block'; | ||
} else { | ||
BalloonEditor | ||
.create( document.querySelector( '#editor' ), { | ||
plugins: [ ArticlePluginSet ], | ||
toolbar: [ 'bold', 'link' ] | ||
} ) | ||
.then( editor => { | ||
window.editor = editor; | ||
|
||
$( '#modal' ).modal( { | ||
// Make sure the modal does not steal the input focus (e.g. when editing a link). | ||
// https://github.com/ckeditor/ckeditor5/issues/1147 | ||
focus: false | ||
} ); | ||
} ) | ||
.catch( err => { | ||
console.error( err.stack ); | ||
} ); | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters