-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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 #14277 from ckeditor/ck/14235-ability-to-display-p…
…bc-despite-having-license-check Other (ui): Added a configuration option that forces the "Powered by" logo to show up despite a valid license key being used. Closes #14235.
- Loading branch information
Showing
7 changed files
with
164 additions
and
3 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
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
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
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
35 changes: 35 additions & 0 deletions
35
packages/ckeditor5-ui/tests/manual/poweredby/poweredby-force-visible.html
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,35 @@ | ||
<div id="force-visible"> | ||
<h2>The three greatest things you learn from traveling</h2> | ||
<p>Like all the great things on earth traveling teaches us by example. Here are some of the most precious lessons | ||
I’ve | ||
learned over the years of traveling.</p> | ||
|
||
<blockquote> | ||
<p>The real voyage of discovery consists not in seeking new landscapes, but having new eyes.</p> | ||
<p><strong>Marcel Proust</strong></p> | ||
</blockquote> | ||
<h3>Improvisation</h3> | ||
<p>Life doesn't allow us to execute every single plan perfectly. This especially seems to be the case when you | ||
travel. | ||
You plan it down to every minute with a big checklist. But when it comes to executing it, something always comes | ||
up | ||
and you’re left with your improvising skills. You learn to adapt as you go. Here’s how my travel checklist looks | ||
now:</p> | ||
<ul> | ||
<li>buy the ticket</li> | ||
<li>start your adventure</li> | ||
</ul> | ||
<figure class="image image-style-side"><img | ||
src="https://ckeditor.com/docs/ckeditor5/latest/assets/img/umbrellas.jpg" | ||
alt="Three monks ascending the stairs of an ancient temple." | ||
srcset="https://ckeditor.com/docs/ckeditor5/latest/assets/img/umbrellas.jpg, https://ckeditor.com/docs/ckeditor5/latest/assets/img/umbrellas_2x.jpg 2x" | ||
sizes="100vw"> | ||
<figcaption>Three monks ascending the stairs of an ancient temple.</figcaption> | ||
</figure> | ||
<h3>Confidence</h3> | ||
<p>Going to a new place can be quite terrifying. While change and uncertainty make us scared, traveling teaches us | ||
how | ||
ridiculous it is to be afraid of something before it happens. The moment you face your fear and see there is | ||
nothing | ||
to be afraid of, is the moment you discover bliss.</p> | ||
</div> |
65 changes: 65 additions & 0 deletions
65
packages/ckeditor5-ui/tests/manual/poweredby/poweredby-force-visible.js
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,65 @@ | ||
/** | ||
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
|
||
/* globals console, window, document, CKEditorInspector */ | ||
|
||
import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor'; | ||
import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset'; | ||
import { ImageResize } from '@ckeditor/ckeditor5-image'; | ||
|
||
const licenseKey = window.prompt( 'Enter valid key' ); // eslint-disable-line no-alert | ||
|
||
window.editors = {}; | ||
|
||
function createEditor( selector ) { | ||
ClassicEditor | ||
.create( document.querySelector( selector ), { | ||
plugins: [ ArticlePluginSet, ImageResize ], | ||
toolbar: [ | ||
'heading', | ||
'|', | ||
'bold', | ||
'italic', | ||
'link', | ||
'bulletedList', | ||
'numberedList', | ||
'|', | ||
'outdent', | ||
'indent', | ||
'|', | ||
'blockQuote', | ||
'insertTable', | ||
'mediaEmbed', | ||
'undo', | ||
'redo' | ||
], | ||
image: { | ||
toolbar: [ 'imageStyle:inline', 'imageStyle:block', 'imageStyle:side', '|', 'imageTextAlternative' ] | ||
}, | ||
...( licenseKey && { licenseKey } ), | ||
table: { | ||
contentToolbar: [ | ||
'tableColumn', | ||
'tableRow', | ||
'mergeTableCells' | ||
] | ||
}, | ||
ui: { | ||
poweredBy: { | ||
forceVisible: true | ||
} | ||
} | ||
} ) | ||
.then( editor => { | ||
window.editors[ selector ] = editor; | ||
|
||
CKEditorInspector.attach( { [ selector ]: editor } ); | ||
} ) | ||
.catch( err => { | ||
console.error( err.stack ); | ||
} ); | ||
} | ||
|
||
createEditor( '#force-visible' ); |
3 changes: 3 additions & 0 deletions
3
packages/ckeditor5-ui/tests/manual/poweredby/poweredby-force-visible.md
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,3 @@ | ||
# Powered by forced to be visible. | ||
|
||
Even if a valid license key is given. |