[gen] Make ckeditor work with IE.
This commit is contained in:
parent
e1e1b90921
commit
48c7c50122
|
@ -1832,8 +1832,7 @@ class BaseMixin:
|
|||
if isinstance(v, int): sv = str(v)
|
||||
else: sv = '"%s"' % v
|
||||
ck.append('%s: %s' % (k, sv))
|
||||
res = 'CKEDITOR.replace("%s", {%s})' % (name, ', '.join(ck))
|
||||
return res
|
||||
return 'CKEDITOR.replace("%s", {%s})' % (name, ', '.join(ck))
|
||||
|
||||
def getCalendarInit(self, name, years):
|
||||
'''Gets the Javascript init code for displaying a calendar popup for
|
||||
|
|
|
@ -2,27 +2,25 @@
|
|||
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.editorConfig = function(config) {
|
||||
config.toolbar = 'Appy';
|
||||
config.toolbar_Appy = [
|
||||
{name: 'basicstyles', items: ['Format', 'Bold', 'Italic', 'Underline',
|
||||
'Strike', 'Subscript', 'Superscript',
|
||||
'RemoveFormat'] },
|
||||
{name: 'paragraph', items: ['NumberedList', 'BulletedList'] },
|
||||
{name: 'clipboard', items: ['Cut', 'Copy', 'Paste', 'PasteText',
|
||||
'Undo', 'Redo']},
|
||||
{name: 'editing', items: ['Scayt']},
|
||||
{name: 'insert', items: ['Image', 'Table', 'SpecialChar', 'Link',
|
||||
'Unlink', 'Source', 'Maximize']},
|
||||
{ name: 'basicstyles',
|
||||
items: ["Format", "Bold", "Italic", "Underline", "Strike",
|
||||
"Subscript", "Superscript", "RemoveFormat"]},
|
||||
{ name: 'paragraph',
|
||||
items: ["NumberedList","BulletedList"]},
|
||||
{ name: 'clipboard',
|
||||
items: ["Cut","Copy","Paste","PasteText","Undo","Redo"]},
|
||||
{ name: 'editing', items: ["Scayt"]},
|
||||
{ name: 'insert',
|
||||
items: ["Image","Table","SpecialChar","Link","Unlink","Source","Maximize"]}
|
||||
];
|
||||
config.format_p = { element:'p', attributes:{'style':'margin:0;padding:0'}};
|
||||
config.format_h1 = { element:'h1', attributes:{'style':'margin:0;padding:0'}};
|
||||
config.format_h2 = { element:'h2', attributes:{'style':'margin:0;padding:0'}};
|
||||
config.format_h3 = { element:'h3', attributes:{'style':'margin:0;padding:0'}};
|
||||
config.format_h4 = { element:'h4', attributes:{'style':'margin:0;padding:0'}};
|
||||
config.entities = false;
|
||||
config.entities_greek = false;
|
||||
config.entities_latin = false;
|
||||
config.fillEmptyBlocks = false;
|
||||
config.removePlugins = 'elementspath';
|
||||
config.scayt_sLang = 'fr_BE';
|
||||
config.scayt_uiTabs = '0,1,0';
|
||||
};
|
||||
|
|
|
@ -3,25 +3,14 @@ Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
|||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
body { font-family: sans-serif, Arial, Verdana, "Trebuchet MS"; margin: 20px;
|
||||
font-size: 12px; color: #333; background-color: #fff /* Transparent */ }
|
||||
.cke_editable { font-size: 13px; line-height: 1.6em }
|
||||
blockquote { font-style: italic;
|
||||
font-family: Georgia, Times, "Times New Roman", serif; padding: 2px 0;
|
||||
border-style: solid; border-color: #ccc; border-width: 0 }
|
||||
.cke_contents_ltr blockquote { padding-left: 20px; padding-right: 8px;
|
||||
border-left-width: 5px }
|
||||
.cke_contents_rtl blockquote { padding-left: 8px; padding-right: 20px;
|
||||
border-right-width: 5px }
|
||||
body { font: 75% Helvetica,Arial,sans-serif; margin: 5px;
|
||||
color: #333; background-color: #fff }
|
||||
p { margin: 0; padding: 0 0 3px 0 }
|
||||
table { border-collapse: collapse; border-spacing: 0 }
|
||||
a { color: #0782C1 }
|
||||
ol,ul,dl { *margin-right: 0px; padding: 0 40px }
|
||||
h1,h2,h3,h4,h5,h6 { font-weight: normal; line-height: 1.2em }
|
||||
hr { border: 0px; border-top: 1px solid #ccc }
|
||||
img.right { border: 1px solid #ccc; float: right; margin-left: 15px;
|
||||
padding: 5px }
|
||||
img.left { border: 1px solid #ccc; float: left; margin-right: 15px;
|
||||
padding: 5px }
|
||||
h1,h2,h3,h4,h5,h6 { font-weight: bold; line-height: 1.2em }
|
||||
img.right { float: right; margin-left: 5px; padding: 5px }
|
||||
img.left { float: left; margin-right: 5px; padding: 5px }
|
||||
img:hover { opacity: .9; filter: alpha(opacity = 90) }
|
||||
pre { white-space: pre-wrap; /* CSS 2.1 */ word-wrap: break-word; /* IE7 */ }
|
||||
.marker { background-color: Yellow }
|
||||
table { border-collapse: collapse; border-spacing: 0 }
|
||||
pre { white-space: pre-wrap; word-wrap: break-word }
|
||||
ol,ul,dl { *margin-right: 0px; padding: 0 40px }
|
||||
|
|
|
@ -2,110 +2,4 @@
|
|||
* Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
// This file contains style definitions that can be used by CKEditor plugins.
|
||||
//
|
||||
// The most common use for it is the "stylescombo" plugin, which shows a combo
|
||||
// in the editor toolbar, containing all styles. Other plugins instead, like
|
||||
// the div plugin, use a subset of the styles on their feature.
|
||||
//
|
||||
// If you don't have plugins that depend on this file, you can simply ignore it.
|
||||
// Otherwise it is strongly recommended to customize this file to match your
|
||||
// website requirements and design properly.
|
||||
|
||||
CKEDITOR.stylesSet.add( 'default', [
|
||||
/* Block Styles */
|
||||
|
||||
// These styles are already available in the "Format" combo ("format" plugin),
|
||||
// so they are not needed here by default. You may enable them to avoid
|
||||
// placing the "Format" combo in the toolbar, maintaining the same features.
|
||||
/*
|
||||
{ name: 'Paragraph', element: 'p' },
|
||||
{ name: 'Heading 1', element: 'h1' },
|
||||
{ name: 'Heading 2', element: 'h2' },
|
||||
{ name: 'Heading 3', element: 'h3' },
|
||||
{ name: 'Heading 4', element: 'h4' },
|
||||
{ name: 'Heading 5', element: 'h5' },
|
||||
{ name: 'Heading 6', element: 'h6' },
|
||||
{ name: 'Preformatted Text',element: 'pre' },
|
||||
{ name: 'Address', element: 'address' },
|
||||
*/
|
||||
|
||||
{ name: 'Italic Title', element: 'h2', styles: { 'font-style': 'italic' } },
|
||||
{ name: 'Subtitle', element: 'h3', styles: { 'color': '#aaa', 'font-style': 'italic' } },
|
||||
{
|
||||
name: 'Special Container',
|
||||
element: 'div',
|
||||
styles: {
|
||||
padding: '5px 10px',
|
||||
background: '#eee',
|
||||
border: '1px solid #ccc'
|
||||
}
|
||||
},
|
||||
|
||||
/* Inline Styles */
|
||||
|
||||
// These are core styles available as toolbar buttons. You may opt enabling
|
||||
// some of them in the Styles combo, removing them from the toolbar.
|
||||
// (This requires the "stylescombo" plugin)
|
||||
/*
|
||||
{ name: 'Strong', element: 'strong', overrides: 'b' },
|
||||
{ name: 'Emphasis', element: 'em' , overrides: 'i' },
|
||||
{ name: 'Underline', element: 'u' },
|
||||
{ name: 'Strikethrough', element: 'strike' },
|
||||
{ name: 'Subscript', element: 'sub' },
|
||||
{ name: 'Superscript', element: 'sup' },
|
||||
*/
|
||||
|
||||
{ name: 'Marker', element: 'span', attributes: { 'class': 'marker' } },
|
||||
|
||||
{ name: 'Big', element: 'big' },
|
||||
{ name: 'Small', element: 'small' },
|
||||
{ name: 'Typewriter', element: 'tt' },
|
||||
|
||||
{ name: 'Computer Code', element: 'code' },
|
||||
{ name: 'Keyboard Phrase', element: 'kbd' },
|
||||
{ name: 'Sample Text', element: 'samp' },
|
||||
{ name: 'Variable', element: 'var' },
|
||||
|
||||
{ name: 'Deleted Text', element: 'del' },
|
||||
{ name: 'Inserted Text', element: 'ins' },
|
||||
|
||||
{ name: 'Cited Work', element: 'cite' },
|
||||
{ name: 'Inline Quotation', element: 'q' },
|
||||
|
||||
{ name: 'Language: RTL', element: 'span', attributes: { 'dir': 'rtl' } },
|
||||
{ name: 'Language: LTR', element: 'span', attributes: { 'dir': 'ltr' } },
|
||||
|
||||
/* Object Styles */
|
||||
|
||||
{
|
||||
name: 'Styled image (left)',
|
||||
element: 'img',
|
||||
attributes: { 'class': 'left' }
|
||||
},
|
||||
|
||||
{
|
||||
name: 'Styled image (right)',
|
||||
element: 'img',
|
||||
attributes: { 'class': 'right' }
|
||||
},
|
||||
|
||||
{
|
||||
name: 'Compact table',
|
||||
element: 'table',
|
||||
attributes: {
|
||||
cellpadding: '5',
|
||||
cellspacing: '0',
|
||||
border: '1',
|
||||
bordercolor: '#ccc'
|
||||
},
|
||||
styles: {
|
||||
'border-collapse': 'collapse'
|
||||
}
|
||||
},
|
||||
|
||||
{ name: 'Borderless Table', element: 'table', styles: { 'border-style': 'hidden', 'background-color': '#E6E6FA' } },
|
||||
{ name: 'Square Bulleted List', element: 'ul', styles: { 'list-style-type': 'square' } }
|
||||
]);
|
||||
|
||||
CKEDITOR.stylesSet.add('default',[]);
|
||||
|
|
|
@ -974,7 +974,8 @@ class XhtmlCleaner(XmlParser):
|
|||
|
||||
# Attributes to ignore, if keepStyles if False.
|
||||
attrsToIgnore = ('align', 'valign', 'cellpadding', 'cellspacing', 'width',
|
||||
'height', 'bgcolor', 'lang', 'border', 'class', 'rules')
|
||||
'height', 'bgcolor', 'lang', 'border', 'class', 'rules',
|
||||
'id', 'name')
|
||||
# CSS attributes to keep even if keepStyles if False. These attributes can
|
||||
# be used by pod (to align a paragraph, center/resize an image...).
|
||||
cssAttrsToKeep = ('width', 'height', 'float', 'text-align',
|
||||
|
@ -1119,7 +1120,8 @@ class XhtmlCleaner(XmlParser):
|
|||
|
||||
def characters(self, content):
|
||||
if self.env.ignoreContent: return
|
||||
# Remove blanks that ckeditor may add just after a start tag
|
||||
# Remove blanks that ckeditor may add just after a start tag or
|
||||
# between tags.
|
||||
if not self.env.currentContent or \
|
||||
self.env.currentContent[-1] in ('\n', ' '):
|
||||
toAdd = content.lstrip()
|
||||
|
|
Loading…
Reference in a new issue