Skip to content

Commit

Permalink
Added consistent content CSS to the caption test.
Browse files Browse the repository at this point in the history
  • Loading branch information
mlewand committed Jan 30, 2018
1 parent c595592 commit 289bd70
Showing 1 changed file with 85 additions and 80 deletions.
165 changes: 85 additions & 80 deletions tests/plugins/imagebase/features/manual/caption.html
Original file line number Diff line number Diff line change
@@ -1,92 +1,97 @@
<h2>Classic editor</h2>
<head>
<link rel="stylesheet" href="/apps/ckeditor/contents.css">
</head>
<body>
<h2>Classic editor</h2>

<div id="classic">
<p>Widget without caption:</p>
<figure>
<img src="../../../image2/_assets/foo.png" alt="foo">
</figure>
<p>Widget with empty caption:</p>
<figure>
<a href="https://cksource.com">
<div id="classic">
<p>Widget without caption:</p>
<figure>
<img src="../../../image2/_assets/foo.png" alt="foo">
</a>
<figcaption></figcaption>
</figure>
<p>Widget with caption:</p>
<figure>
<a href="https://cksource.com">
<img src="../../../image2/_assets/foo.png" alt="foo">
</a>
<figcaption>Test caption</figcaption>
</figure>
</div>
</figure>
<p>Widget with empty caption:</p>
<figure>
<a href="https://cksource.com">
<img src="../../../image2/_assets/foo.png" alt="foo">
</a>
<figcaption></figcaption>
</figure>
<p>Widget with caption:</p>
<figure>
<a href="https://cksource.com">
<img src="../../../image2/_assets/foo.png" alt="foo">
</a>
<figcaption>Test caption</figcaption>
</figure>
</div>

<h2>Divarea editor</h2>
<h2>Divarea editor</h2>

<div id="divarea">
<p>Widget without caption:</p>
<figure>
<img src="../../../image2/_assets/foo.png" alt="foo">
</figure>
<p>Widget with empty caption:</p>
<figure>
<a href="https://cksource.com">
<img src="../../../image2/_assets/foo.png" alt="foo">
</a>
<figcaption></figcaption>
</figure>
<p>Widget with caption:</p>
<figure>
<a href="https://cksource.com">
<div id="divarea">
<p>Widget without caption:</p>
<figure>
<img src="../../../image2/_assets/foo.png" alt="foo">
</a>
<figcaption>Test caption</figcaption>
</figure>
</div>
</figure>
<p>Widget with empty caption:</p>
<figure>
<a href="https://cksource.com">
<img src="../../../image2/_assets/foo.png" alt="foo">
</a>
<figcaption></figcaption>
</figure>
<p>Widget with caption:</p>
<figure>
<a href="https://cksource.com">
<img src="../../../image2/_assets/foo.png" alt="foo">
</a>
<figcaption>Test caption</figcaption>
</figure>
</div>

<h2>Inline editor</h2>
<h2>Inline editor</h2>

<div id="inline" contenteditable="true">
<p>Widget without caption:</p>
<figure>
<img src="../../../image2/_assets/foo.png" alt="foo">
</figure>
<p>Widget with empty caption:</p>
<figure>
<a href="https://cksource.com">
<img src="../../../image2/_assets/foo.png" alt="foo">
</a>
<figcaption></figcaption>
</figure>
<p>Widget with caption:</p>
<figure>
<a href="https://cksource.com">
<div id="inline" contenteditable="true">
<p>Widget without caption:</p>
<figure>
<img src="../../../image2/_assets/foo.png" alt="foo">
</a>
<figcaption>Test caption</figcaption>
</figure>
</div>
</figure>
<p>Widget with empty caption:</p>
<figure>
<a href="https://cksource.com">
<img src="../../../image2/_assets/foo.png" alt="foo">
</a>
<figcaption></figcaption>
</figure>
<p>Widget with caption:</p>
<figure>
<a href="https://cksource.com">
<img src="../../../image2/_assets/foo.png" alt="foo">
</a>
<figcaption>Test caption</figcaption>
</figure>
</div>

<script>
( function() {
'use strict';
<script>
( function() {
'use strict';

var commonConfig = {
on: {
pluginsLoaded: function( evt ) {
var editor = evt.editor,
plugin = CKEDITOR.plugins.imagebase;
var commonConfig = {
on: {
pluginsLoaded: function( evt ) {
var editor = evt.editor,
plugin = CKEDITOR.plugins.imagebase;

plugin.addImageWidget( editor, 'testWidget', plugin.addFeature( editor, 'caption', {} ) );
}
},
height: 500
};
plugin.addImageWidget( editor, 'testWidget', plugin.addFeature( editor, 'caption', {} ) );
}
},
height: 500
};

CKEDITOR.replace( 'classic', commonConfig );
CKEDITOR.replace( 'divarea', CKEDITOR.tools.object.merge( commonConfig, {
extraPlugins: 'divarea'
} ) );
CKEDITOR.inline( 'inline', commonConfig );
}() );
</script>
CKEDITOR.replace( 'classic', commonConfig );
CKEDITOR.replace( 'divarea', CKEDITOR.tools.object.merge( commonConfig, {
extraPlugins: 'divarea'
} ) );
CKEDITOR.inline( 'inline', commonConfig );
}() );
</script>
</body>

0 comments on commit 289bd70

Please sign in to comment.