Here's my scenario: I have CKEditor with docprops enabled and fullpage set true. With fullpage true the contentsCss does nothing, that's a "won't fix" in Trac.
I'm trying to modify the NewPage code that gets replaced. Currently (with fullpage true), this is what clicking NewPage enters:
<!DOCTYPE html />
<html>
<head>
<title></title>
</head>
<body></body>
</html>
That's great, but there is no way to edit it. Using newpage_html only enters code into the body tags, not replacing the whole thing.
I want to replace the entire code so I can declare my CSS defaults which I can't do since fullpage is enabled.
I've looked high and low and I can't find out how to modify this. I can't even find where the default code is coming from in the source code! Any he开发者_如何转开发lp would be glorious!
Use config.newpage_html (it was missing from the docs)
CKEDITOR.replace( 'editor1',
{
fullPage : true,
extraPlugins : 'docprops',
newpage_html : '<!doctype html><html><head><title>My test</title>' +
'<link href="sample.css" rel="stylesheet" type="text/css" />' +
'</head><body>New page, type here</body></html>'
});
精彩评论