|
2 | 2 | 'use strict';
|
3 | 3 |
|
4 | 4 | $(function() {
|
5 |
| - $('body').prepend( $('<toolbar></toolbar>') ); |
6 |
| - $('body').append( $('<media-library></media-library>') ); |
7 |
| - $('head').append( $('<link rel="stylesheet" type="text/css" />').attr('href', 'https://fonts.googleapis.com/css?family=Roboto:400,500,700,300,100') ); |
8 |
| - $('head').append( $('<link rel="stylesheet" type="text/css" />').attr('href', 'https://fonts.googleapis.com/icon?family=Material+Icons') ); |
9 |
| - $('head').append( $('<link rel="stylesheet" type="text/css" />').attr('href', config.CONTENT_SNIPPETS_EDIT_CSS_URL) ); |
10 |
| - $.getScript('https://cdn.ckeditor.com/4.5.10/standard/ckeditor.js', function() { |
11 |
| - global.CKEDITOR.config.autoParagraph = false; |
12 |
| - global.CKEDITOR.config.allowedContent = true; |
| 5 | + var body = $('body'), |
| 6 | + head = $('head'); |
| 7 | + |
| 8 | + body.prepend( $('<toolbar></toolbar>') ); |
| 9 | + body.append( $('<media-library></media-library>') ); |
| 10 | + |
| 11 | + head.append( $('<link rel="stylesheet" type="text/css" />').attr('href', 'https://fonts.googleapis.com/css?family=Roboto:400,500,700,300,100') ); |
| 12 | + head.append( $('<link rel="stylesheet" type="text/css" />').attr('href', 'https://fonts.googleapis.com/icon?family=Material+Icons') ); |
| 13 | + head.append( $('<link rel="stylesheet" type="text/css" />').attr('href', config.CONTENT_SNIPPETS_EDIT_CSS_URL) ); |
| 14 | + |
| 15 | + $.getScript('https://cdn.ckeditor.com/4.6.2/standard/ckeditor.js', function() { |
13 | 16 | global.CKEDITOR.plugins.addExternal( 'media-selector', global.config.CKEDITOR_PLUGINS_URL + 'media-selector/', 'plugin.js' );
|
14 | 17 | global.CKEDITOR.plugins.addExternal( 'sourcedialog', global.config.CKEDITOR_PLUGINS_URL + 'sourcedialog/', 'plugin.js' );
|
15 | 18 | global.CKEDITOR.plugins.addExternal( 'codemirror', global.config.CKEDITOR_PLUGINS_URL + 'codemirror/', 'plugin.js' );
|
| 19 | + |
| 20 | + global.CKEDITOR.config.allowedContent = true; |
16 | 21 | global.CKEDITOR.config.extraPlugins = 'media-selector,sourcedialog';
|
17 | 22 | global.CKEDITOR.config.removePlugins = 'image,sourcearea';
|
18 | 23 |
|
|
0 commit comments