chore(admonitions): start off with a fresh copy of blockquote plugin

This commit is contained in:
Elian Doran
2025-03-13 18:27:05 +02:00
commit e24812f1a3
100 changed files with 4311 additions and 0 deletions

View File

@@ -0,0 +1 @@
<script src="https://cdn.ckbox.io/ckbox/latest/ckbox.js"></script>

View File

@@ -0,0 +1,51 @@
/**
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
/* globals window */
import { CKBox, CKBoxImageEdit } from '@ckeditor/ckeditor5-ckbox';
import { PictureEditing, ImageInsert, ImageResize, AutoImage } from '@ckeditor/ckeditor5-image';
import { LinkImage } from '@ckeditor/ckeditor5-link';
import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config.js';
import { TOKEN_URL } from '@ckeditor/ckeditor5-ckbox/tests/_utils/ckbox-config.js';
// Umberto combines all `packages/*/docs` into the `docs/` directory. The import path must be valid after merging all directories.
import ClassicEditor from '../build-classic.js';
ClassicEditor.defaultConfig = {
plugins: ClassicEditor.builtinPlugins.concat( [
PictureEditing,
ImageResize,
ImageInsert,
AutoImage,
LinkImage,
CKBox,
CKBoxImageEdit
] ),
cloudServices: CS_CONFIG,
toolbar: {
items: [
'undo', 'redo', '|', 'heading',
'|', 'bold', 'italic',
'|', 'link', 'insertImage', 'insertTable', 'blockQuote', 'mediaEmbed',
'|', 'bulletedList', 'numberedList', 'outdent', 'indent'
]
},
ui: {
viewportOffset: {
top: window.getViewportTopOffsetConfig()
}
},
ckbox: {
tokenUrl: TOKEN_URL,
allowExternalImagesEditing: [ /^data:/, 'origin', /ckbox/ ],
forceDemoLabel: true
},
image: {
toolbar: [ 'toggleImageCaption', 'imageTextAlternative', 'ckboxImageEdit' ]
}
};
window.ClassicEditor = ClassicEditor;

View File

@@ -0,0 +1,27 @@
<div class="ck ck-content" id="snippet-block-quote">
<h3>The Famous Einstein Quote that never was</h3>
<p>You might have come across the following quote in the past few years:</p>
<blockquote>
<p>Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.</p>
<p>Albert Einstein</p>
</blockquote>
<p>It has been most popular on Facebook and other social networks, where people share it aplenty. No wonder: it is neat, it sounds smart, and, let&rsquo;s be frank, Albert is one hell of a figure!</p>
<p>The truth is not as neat, though. And mindlessly forwarding the quote isnt exactly smart. Thats because Einstein never said that. The quote comes from the 2004 book <em>The Rhythm of Life: Living Every Day with Passion and Purpose</em> by Mathew Kelly, published almost 50 years after Albert&rsquo;s death in 1955.</p>
<p>Kelly was most likely inspired by an essay by Amos E. Dolbear of Tufts titled &ldquo;An Educational Allegory,&rdquo; describing animals educated to work on their weakest features instead of their strongest ones. So an eagle was made to run, a penguin was forced to fly, and so on. There is also the 1903 &ldquo;Jungle School Boards&rdquo; fable from an Illinois newspaper. It tells a story of a monkey, a kangaroo, and an elephant who cannot agree on the curriculum for their animal school &mdash; should all the little animals be taught tree-climbing, jumping, or looking wise?&nbsp;</p>
<p>In the late 1940s, something that appears to be an amalgam of the two was published and later reprinted with various changes in the 1960s. The idea evolved for decades and got mixed up with a few other quotes about being a genius originating back in the 1970s. Finally, Kelly wrote in his 2004 book:</p>
<blockquote>
<p>Albert Einstein wrote, &ldquo;Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.&rdquo; The question I have for you at this point of our journey together is, &ldquo;What is your genius?&rdquo;</p>
</blockquote>
<p>Why he attributed this to Albert Einstein remains unclear. The fact is, the quote got popular. But, apparently, not everyone is a genius when it comes to fact-checking and sources.</p>
</div>

View File

@@ -0,0 +1,20 @@
/**
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
/* globals ClassicEditor, window, document, console */
ClassicEditor
.create( document.querySelector( '#snippet-block-quote' ) )
.then( editor => {
window.editor = editor;
window.attachTourBalloon( {
target: window.findToolbarItem( editor.ui.view.toolbar, item => item.label && item.label === 'Block quote' ),
text: 'Click to insert a block quote.',
editor
} );
} )
.catch( err => {
console.error( err.stack );
} );

View File

@@ -0,0 +1,26 @@
<div class="ck ck-content" id="snippet-nested-block-quote">
<p>Re: Material usage information</p>
<blockquote>
<blockquote>
<p>Tom,</p>
<p>This is just a reminder that we need the data for our Friday meeting with the external subcontractors. Can you please let me know if all the reports are ready?</p>
<p>Zoe</p>
</blockquote>
<p>Hi Zoe,</p>
<p>The reports are coming in, but the Q3 data is still missing. As far as I can tell, Shizuoka is behind the schedule with the final summary, and the Expansion Department has not released its numbers yet. I will reach out to both and will keep you informed on that topic by noon tomorrow.</p>
<p>Tom</p>
</blockquote>
<p>Please do so, this is getting urgent. Contact Haleema from ED directly. Also, check with Shizuoka. This is very much unlike him to leave such an important matter for the last moment.</p>
<p>Hope to have this ready for review at the 2&nbsp;p.m. board meeting provided you can manage to prepare a summary and have the full data by Thursday morning at the latest.</p>
<p>Zoe</p>
</div>

View File

@@ -0,0 +1,15 @@
/**
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
/* globals ClassicEditor, window, document, console */
ClassicEditor
.create( document.querySelector( '#snippet-nested-block-quote' ) )
.then( editor => {
window.editor2 = editor;
} )
.catch( err => {
console.error( err.stack );
} );