Selaa lähdekoodia

Feature: Added block quotes feature. Closes #5.

Piotrek Koszuliński 8 vuotta sitten
vanhempi
commit
5eb706991a

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
packages/ckeditor5-build-classic/build/ckeditor.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
packages/ckeditor5-build-classic/build/ckeditor.js.map


+ 2 - 0
packages/ckeditor5-build-classic/ckeditor.js

@@ -8,6 +8,7 @@ import EssentialsPlugin from '@ckeditor/ckeditor5-presets/src/essentials';
 import AutoformatPlugin from '@ckeditor/ckeditor5-autoformat/src/autoformat';
 import BoldPlugin from '@ckeditor/ckeditor5-basic-styles/src/bold';
 import ItalicPlugin from '@ckeditor/ckeditor5-basic-styles/src/italic';
+import BlockquotePlugin from '@ckeditor/ckeditor5-block-quote/src/blockquote';
 import HeadingPlugin from '@ckeditor/ckeditor5-heading/src/heading';
 import ImagePlugin from '@ckeditor/ckeditor5-image/src/image';
 import ImagecaptionPlugin from '@ckeditor/ckeditor5-image/src/imagecaption';
@@ -25,6 +26,7 @@ ClassicEditor.build = {
 		AutoformatPlugin,
 		BoldPlugin,
 		ItalicPlugin,
+		BlockquotePlugin,
 		HeadingPlugin,
 		ImagePlugin,
 		ImagecaptionPlugin,

+ 1 - 0
packages/ckeditor5-build-classic/config-build.js

@@ -14,6 +14,7 @@ module.exports = {
 		'@ckeditor/ckeditor5-autoformat/src/autoformat',
 		'@ckeditor/ckeditor5-basic-styles/src/bold',
 		'@ckeditor/ckeditor5-basic-styles/src/italic',
+		'@ckeditor/ckeditor5-block-quote/src/blockquote',
 		'@ckeditor/ckeditor5-heading/src/heading',
 		'@ckeditor/ckeditor5-image/src/image',
 		'@ckeditor/ckeditor5-image/src/imagecaption',

+ 1 - 0
packages/ckeditor5-build-classic/config-editor.js

@@ -14,6 +14,7 @@ module.exports = {
 		'unlink',
 		'bulletedList',
 		'numberedList',
+		'blockQuote',
 		'undo',
 		'redo'
 	],

+ 1 - 0
packages/ckeditor5-build-classic/package.json

@@ -9,6 +9,7 @@
     "@ckeditor/ckeditor5-presets": "^0.2.1",
     "@ckeditor/ckeditor5-autoformat": "*",
     "@ckeditor/ckeditor5-basic-styles": "*",
+    "@ckeditor/ckeditor5-block-quote": "^0.1.0",
     "@ckeditor/ckeditor5-heading": "^0.9.0",
     "@ckeditor/ckeditor5-image": "^0.5.0",
     "@ckeditor/ckeditor5-link": "^0.6.0",

+ 11 - 23
packages/ckeditor5-build-classic/sample/index.html

@@ -17,41 +17,29 @@
 <div id="editor">
 	<h2>About CKEditor&nbsp;5</h2>
 
-	<p>This is <a href="https://ckeditor5.github.io">CKEditor&nbsp;5</a>.
-	</p>
+	<p>This is <a href="https://ckeditor5.github.io">CKEditor&nbsp;5</a>.</p>
 
 	<figure class="image">
 		<img src="../tests/manual/sample.jpg" alt="Autumn fields" />
 	</figure>
 
-	<p>After more than 2 years of building the next generation editor from
-		scratch and closing over 980 tickets, we created a highly <strong>extensible
-		and flexible architecture</strong> which consists of an <strong>amazing
-		editing framework</strong> and <strong>editing
-		solutions</strong> that will be built on top of it.</p>
+	<p>After more than 2 years of building the next generation editor from scratch and closing over 980 tickets, we created a highly <strong>extensible and flexible architecture</strong> which consists of an <strong>amazing editing framework</strong> and <strong>editing solutions</strong> that will be built on top of it.</p>
+
+	<p>We explained this design choice in <a href="https://medium.com/content-uneditable/ckeditor-5-the-future-of-rich-text-editing-2b9300f9df2c">&ldquo;CKEditor 5: The future of rich text editing&ldquo;</a>:</p>
+
+	<blockquote><p>(…) we are changing our approach with CKEditor 5. We will no longer have only two solutions available, instead CKEditor will be seen as a framework for editing solutions. At the same time, we will be developing several out-of-the-box solutions based on it, which will be available to use in many different contexts. It will be a real “one size fits all” approach, from little requirements, to super advanced full featured applications.</p></blockquote>
 
 	<h3>Notes</h3>
 
-	<p><a href="https://ckeditor5.github.io">CKEditor&nbsp;5</a> is <em>under
-		heavy development</em> and this demo is not production-ready
-		software. For example:</p>
+	<p><a href="https://ckeditor5.github.io">CKEditor&nbsp;5</a> is <em>under heavy development</em> and this demo is not production-ready software. For example:</p>
 
 	<ul>
-		<li><strong>Only Chrome, Opera and Safari are supported</strong>.
-		</li>
-		<li>Firefox requires enabling the <a
-			href="https://developer.mozilla.org/en-US/docs/Web/API/Document/onselectionchange">&ldquo;dom.select_events.enabled&rdquo;</a>
-			option.
-		</li>
-		<li><a href="https://github.com/ckeditor/ckeditor5/issues/342">Support
-			for pasting</a> is under development (content filtering is
-			unstable).
-		</li>
+		<li><strong>Only Chrome, Opera and Safari are supported</strong>.</li>
+		<li>Firefox requires enabling the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/onselectionchange">&ldquo;dom.select_events.enabled&rdquo;</a> option.</li>
+		<li><a href="https://github.com/ckeditor/ckeditor5/issues/342">Support for pasting</a> is under development (content filtering is unstable).</li>
 	</ul>
 
-	<p>It has <em>bugs</em> that we are aware of &mdash; and that we
-		will be working on in the next few iterations of the project. Stay
-		tuned for some updates soon!</p>
+	<p>It has <em>bugs</em> that we are aware of &mdash; and that we will be working on in the next few iterations of the project. Stay tuned for some updates soon!</p>
 </div>
 
 <script src="../build/ckeditor.js"></script>

+ 7 - 0
packages/ckeditor5-build-classic/tests/ckeditor.js

@@ -101,6 +101,13 @@ describe( 'ClassicEditor', () => {
 			expect( editor.getData() ).to.equal( data );
 		} );
 
+		it( 'block-quote works', () => {
+			const data = '<blockquote><p>Quote</p></blockquote>';
+
+			editor.setData( data );
+			expect( editor.getData() ).to.equal( data );
+		} );
+
 		it( 'heading works', () => {
 			const data = [
 				'<h2>Heading 1.</h2>',

+ 4 - 0
packages/ckeditor5-build-classic/tests/manual/ckeditor-cjs-version.html

@@ -9,6 +9,10 @@
 
 	<p>After more than 2 years of building the next generation editor from scratch and closing over 980 tickets, we created a highly <strong>extensible and flexible architecture</strong> which consists of an <strong>amazing editing framework</strong> and <strong>editing solutions</strong> that will be built on top of it.</p>
 
+	<p>We explained this design choice in <a href="https://medium.com/content-uneditable/ckeditor-5-the-future-of-rich-text-editing-2b9300f9df2c">&ldquo;CKEditor 5: The future of rich text editing&ldquo;</a>:</p>
+
+	<blockquote><p>(…) we are changing our approach with CKEditor 5. We will no longer have only two solutions available, instead CKEditor will be seen as a framework for editing solutions. At the same time, we will be developing several out-of-the-box solutions based on it, which will be available to use in many different contexts. It will be a real “one size fits all” approach, from little requirements, to super advanced full featured applications.</p></blockquote>
+
 	<h3>Notes</h3>
 
 	<p><a href="https://ckeditor5.github.io">CKEditor&nbsp;5</a> is <em>under heavy development</em> and this demo is not production-ready software. For example:</p>

+ 4 - 0
packages/ckeditor5-build-classic/tests/manual/ckeditor.compat.html

@@ -9,6 +9,10 @@
 
 	<p>After more than 2 years of building the next generation editor from scratch and closing over 980 tickets, we created a highly <strong>extensible and flexible architecture</strong> which consists of an <strong>amazing editing framework</strong> and <strong>editing solutions</strong> that will be built on top of it.</p>
 
+	<p>We explained this design choice in <a href="https://medium.com/content-uneditable/ckeditor-5-the-future-of-rich-text-editing-2b9300f9df2c">&ldquo;CKEditor 5: The future of rich text editing&ldquo;</a>:</p>
+
+	<blockquote><p>(…) we are changing our approach with CKEditor 5. We will no longer have only two solutions available, instead CKEditor will be seen as a framework for editing solutions. At the same time, we will be developing several out-of-the-box solutions based on it, which will be available to use in many different contexts. It will be a real “one size fits all” approach, from little requirements, to super advanced full featured applications.</p></blockquote>
+
 	<h3>Notes</h3>
 
 	<p><a href="https://ckeditor5.github.io">CKEditor&nbsp;5</a> is <em>under heavy development</em> and this demo is not production-ready software. For example:</p>

+ 4 - 0
packages/ckeditor5-build-classic/tests/manual/ckeditor.html

@@ -9,6 +9,10 @@
 
 	<p>After more than 2 years of building the next generation editor from scratch and closing over 980 tickets, we created a highly <strong>extensible and flexible architecture</strong> which consists of an <strong>amazing editing framework</strong> and <strong>editing solutions</strong> that will be built on top of it.</p>
 
+	<p>We explained this design choice in <a href="https://medium.com/content-uneditable/ckeditor-5-the-future-of-rich-text-editing-2b9300f9df2c">&ldquo;CKEditor 5: The future of rich text editing&ldquo;</a>:</p>
+
+	<blockquote><p>(…) we are changing our approach with CKEditor 5. We will no longer have only two solutions available, instead CKEditor will be seen as a framework for editing solutions. At the same time, we will be developing several out-of-the-box solutions based on it, which will be available to use in many different contexts. It will be a real “one size fits all” approach, from little requirements, to super advanced full featured applications.</p></blockquote>
+
 	<h3>Notes</h3>
 
 	<p><a href="https://ckeditor5.github.io">CKEditor&nbsp;5</a> is <em>under heavy development</em> and this demo is not production-ready software. For example:</p>