var iframeBody = $('frame').contentWindow.document.body;
new Element('p', {
html: 'Some non-editable content to make the iframe scroll<br/>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi commodo sapien in massa rhoncus sodales. Ut in ultricies nunc. Nulla velit sapien, ultrices eu egestas at, pretium in nulla. Etiam in sapien aliquet, volutpat augue eu, cursus urna. Suspendisse porta sed augue ultrices tempor. Phasellus ullamcorper vulputate nisi, nec aliquet odio malesuada non. Vivamus in urna nec quam laoreet fermentum.',
styles: {
color: 'grey'
}
}).inject(iframeBody);
// isInline method fix
CKEDITOR.editable.prototype.isInline = function() {
return this.editor.elementMode === CKEDITOR.ELEMENT_MODE_INLINE;
};
var el = new Element('div', {
contenteditable: 'true',
html: '<blockquote>Some <strong>blockquote</strong> to make the magicline appear above.</blockquote><blockquote>Some other blockquote to make the magicline appear above and below.</blockquote>'
}).inject(iframeBody);
CKEDITOR.config.extraPlugins = 'sharedspace';
var editor = CKEDITOR.inline(el, {
removePlugins: 'floatingspace,resize',
sharedSpaces: {
top: 'toolbarContainer',
bottom: 'statusbarContainer'
},
on: {
instanceReady: function() {
$('isInline').set('text', editor.editable().isInline());
}
}
});
new Element('p', {
html: 'Some more non-editable content to make the iframe scroll<br/>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi commodo sapien in massa rhoncus sodales. Ut in ultricies nunc. Nulla velit sapien, ultrices eu egestas at, pretium in nulla. Etiam in sapien aliquet, volutpat augue eu, cursus urna. Suspendisse porta sed augue ultrices tempor. Phasellus ullamcorper vulputate nisi, nec aliquet odio malesuada non. Vivamus in urna nec quam laoreet fermentum. Curabitur gravida rhoncus sapien ut dapibus. Duis porta non justo vel hendrerit.<br/>Phasellus a...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.