Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Commit ab5db32

Browse files
committed
Feature: Added block quotes feature. Closes #5.
1 parent 80314bf commit ab5db32

11 files changed

+37
-25
lines changed

build/ckeditor.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/ckeditor.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ckeditor.js

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import EssentialsPlugin from '@ckeditor/ckeditor5-presets/src/essentials';
88
import AutoformatPlugin from '@ckeditor/ckeditor5-autoformat/src/autoformat';
99
import BoldPlugin from '@ckeditor/ckeditor5-basic-styles/src/bold';
1010
import ItalicPlugin from '@ckeditor/ckeditor5-basic-styles/src/italic';
11+
import BlockquotePlugin from '@ckeditor/ckeditor5-block-quote/src/blockquote';
1112
import HeadingPlugin from '@ckeditor/ckeditor5-heading/src/heading';
1213
import ImagePlugin from '@ckeditor/ckeditor5-image/src/image';
1314
import ImagecaptionPlugin from '@ckeditor/ckeditor5-image/src/imagecaption';
@@ -25,6 +26,7 @@ ClassicEditor.build = {
2526
AutoformatPlugin,
2627
BoldPlugin,
2728
ItalicPlugin,
29+
BlockquotePlugin,
2830
HeadingPlugin,
2931
ImagePlugin,
3032
ImagecaptionPlugin,

config-build.js

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module.exports = {
1414
'@ckeditor/ckeditor5-autoformat/src/autoformat',
1515
'@ckeditor/ckeditor5-basic-styles/src/bold',
1616
'@ckeditor/ckeditor5-basic-styles/src/italic',
17+
'@ckeditor/ckeditor5-block-quote/src/blockquote',
1718
'@ckeditor/ckeditor5-heading/src/heading',
1819
'@ckeditor/ckeditor5-image/src/image',
1920
'@ckeditor/ckeditor5-image/src/imagecaption',

config-editor.js

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module.exports = {
1414
'unlink',
1515
'bulletedList',
1616
'numberedList',
17+
'blockQuote',
1718
'undo',
1819
'redo'
1920
],

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"@ckeditor/ckeditor5-presets": "^0.2.1",
1010
"@ckeditor/ckeditor5-autoformat": "*",
1111
"@ckeditor/ckeditor5-basic-styles": "*",
12+
"@ckeditor/ckeditor5-block-quote": "^0.1.0",
1213
"@ckeditor/ckeditor5-heading": "^0.9.0",
1314
"@ckeditor/ckeditor5-image": "^0.5.0",
1415
"@ckeditor/ckeditor5-link": "^0.6.0",

sample/index.html

+11-23
Original file line numberDiff line numberDiff line change
@@ -17,41 +17,29 @@ <h1>CKEditor 5 – classic build sample</h1>
1717
<div id="editor">
1818
<h2>About CKEditor&nbsp;5</h2>
1919

20-
<p>This is <a href="https://ckeditor5.github.io">CKEditor&nbsp;5</a>.
21-
</p>
20+
<p>This is <a href="https://ckeditor5.github.io">CKEditor&nbsp;5</a>.</p>
2221

2322
<figure class="image">
2423
<img src="../tests/manual/sample.jpg" alt="Autumn fields" />
2524
</figure>
2625

27-
<p>After more than 2 years of building the next generation editor from
28-
scratch and closing over 980 tickets, we created a highly <strong>extensible
29-
and flexible architecture</strong> which consists of an <strong>amazing
30-
editing framework</strong> and <strong>editing
31-
solutions</strong> that will be built on top of it.</p>
26+
<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>
27+
28+
<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>
29+
30+
<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>
3231

3332
<h3>Notes</h3>
3433

35-
<p><a href="https://ckeditor5.github.io">CKEditor&nbsp;5</a> is <em>under
36-
heavy development</em> and this demo is not production-ready
37-
software. For example:</p>
34+
<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>
3835

3936
<ul>
40-
<li><strong>Only Chrome, Opera and Safari are supported</strong>.
41-
</li>
42-
<li>Firefox requires enabling the <a
43-
href="https://developer.mozilla.org/en-US/docs/Web/API/Document/onselectionchange">&ldquo;dom.select_events.enabled&rdquo;</a>
44-
option.
45-
</li>
46-
<li><a href="https://github.com/ckeditor/ckeditor5/issues/342">Support
47-
for pasting</a> is under development (content filtering is
48-
unstable).
49-
</li>
37+
<li><strong>Only Chrome, Opera and Safari are supported</strong>.</li>
38+
<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>
39+
<li><a href="https://github.com/ckeditor/ckeditor5/issues/342">Support for pasting</a> is under development (content filtering is unstable).</li>
5040
</ul>
5141

52-
<p>It has <em>bugs</em> that we are aware of &mdash; and that we
53-
will be working on in the next few iterations of the project. Stay
54-
tuned for some updates soon!</p>
42+
<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>
5543
</div>
5644

5745
<script src="../build/ckeditor.js"></script>

tests/ckeditor.js

+7
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ describe( 'ClassicEditor', () => {
101101
expect( editor.getData() ).to.equal( data );
102102
} );
103103

104+
it( 'block-quote works', () => {
105+
const data = '<blockquote><p>Quote</p></blockquote>';
106+
107+
editor.setData( data );
108+
expect( editor.getData() ).to.equal( data );
109+
} );
110+
104111
it( 'heading works', () => {
105112
const data = [
106113
'<h2>Heading 1.</h2>',

tests/manual/ckeditor-cjs-version.html

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ <h2>About CKEditor&nbsp;5</h2>
99

1010
<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>
1111

12+
<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>
13+
14+
<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>
15+
1216
<h3>Notes</h3>
1317

1418
<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>

tests/manual/ckeditor.compat.html

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ <h2>About CKEditor&nbsp;5</h2>
99

1010
<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>
1111

12+
<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>
13+
14+
<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>
15+
1216
<h3>Notes</h3>
1317

1418
<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>

tests/manual/ckeditor.html

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ <h2>About CKEditor&nbsp;5</h2>
99

1010
<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>
1111

12+
<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>
13+
14+
<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>
15+
1216
<h3>Notes</h3>
1317

1418
<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>

0 commit comments

Comments
 (0)