Last change
on this file since 32057 was 32057, checked in by ak19, 6 years ago |
There was a problem about attributes like align=justify going missing from <p> html elements in doc.xml after a user edits a document. I had been thinking it was an XSLT issue, but Kathy found that the CKEditor was the culprit. Reading up, it seems the CKEditor has an Advanced Content Filter (ACF) mode, which is set to automatic by default and which deletes disallowed elements and other things. I've now adjusted the CKEditor config to to turn off the automatic ACF, so it will the HTML elelements in doc.xml as is if the user didn't make the edit.
|
File size:
1020 bytes
|
Line | |
---|
1 | /**
|
---|
2 | * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
---|
3 | * For licensing, see LICENSE.md or http://ckeditor.com/license
|
---|
4 | */
|
---|
5 |
|
---|
6 | CKEDITOR.editorConfig = function( config ) {
|
---|
7 | //Preventing convert entities
|
---|
8 | config.entities = false;
|
---|
9 | // Define changes to default configuration here. For example:
|
---|
10 | // config.language = 'fr';
|
---|
11 | // config.uiColor = '#AADC6E';
|
---|
12 |
|
---|
13 | // Stop CKEditor from removing the attributes from HTML elements in doc.xml
|
---|
14 | // e.g. <P ALIGN="JUSTIFY"></P> in the original doc.xml gets turned into
|
---|
15 | // <p></p> when viewing the doc in editing mode and then, this ends up
|
---|
16 | // getting saved with user changes upon SaveAndRebuild.
|
---|
17 | // http://nightly.ckeditor.com/17-10-29-07-04/full/samples/old/datafiltering.html
|
---|
18 | // https://sdk.ckeditor.com/samples/acf.html
|
---|
19 | // https://stackoverflow.com/questions/15659390/ckeditor-automatically-strips-classes-from-div
|
---|
20 | // The following stops CKEDITOR from meddling with existing HTML:
|
---|
21 | config.allowedContent = true;
|
---|
22 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.