-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CKEditor is stripping out attributes and styles #1619
Comments
Also |
A callout in case anyone wants to put multiple items. Here's mine for svgs.
|
|
Think we need to make this configurable somewhere, as it may be a security concern for some people (similarly,some may want it to be even more lenient). |
Load a custom config file on installation + a set of default settings? |
I think the best solution to this is to expose the |
Am I missing something? I tried changing my config/config.json to |
@ceplICT After changing the config file, did you attempt to rebuild and restart the authoring tool? If not, give that a shot. |
this issue is easy to replicate by adding the data attribute to a span in the source editor of a component, for example:
<span class="tidbit-trigger tidbit-color" data-bitnum="0">your text here</span>
if you edit anything in the component a second time, the data attribute will get stripped
based on the CKEditor documentation, CKEditor filters incoming HTML content by transforming and deleting disallowed elements, attributes, classes and styles.
taking what is already in the code and adding two things, i have a solution. change this line: https://github.com/adaptlearning/adapt_authoring/blob/master/frontend/src/core/scaffold/scaffoldOverrides.js#L125
to this:
extraAllowedContent: 'span(*)[*]{*}',
please note that this might only fix the span tag (see this post). there's another post in the forum that appears to be doing this to ordered list tags.
the editor documentation shows that specific things can be allowed or disallowed. there is also a way to allow everything... so maybe changing line 125 to this might also fix the ol tags? i haven't tested this theory, just putting it out there:
allowedContent = true
The text was updated successfully, but these errors were encountered: