Skip to content
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.allowedContent not parsed correctly #4

Closed
Propaganistas opened this issue Jan 1, 2015 · 5 comments
Closed

CKEditor.allowedContent not parsed correctly #4

Propaganistas opened this issue Jan 1, 2015 · 5 comments

Comments

@Propaganistas
Copy link
Contributor

Hi

Here's another one:
I've forked my own version of startup.js so I can fine-tune Editable's CKEditor (by adding extra parameters in the CKEDITOR.config object).

However, for some reason or the other allowedContent = true is working properly, but inserting any self-defined tag string won't.
I discovered this when I plugged in Bolt's default wysiwyg allowedContent string (in config.yml) and my FontAwesome icons (<i> tag) were being filtered whenparsed by Editable (despite correct allowance of the tag).

Here's the stuff I'm talking about:

CKEDITOR.config.extraPlugins = 'editable';
// Extra parameters
CKEDITOR.config.autoParagraph = false;
CKEDITOR.config.allowedContent = true;

vs

CKEDITOR.config.extraPlugins = 'editable';
// Extra parameters
CKEDITOR.config.autoParagraph = false;
CKEDITOR.config.allowedContent = 'p i(*); strong em strike cite blockquote code ul ol li dl dt dd br h2 h3 h4 h5 h6;a[!href,title];img[!src,width,height,alt,title]{width,height,text-align,float};table thead tbody tr th td[*]{*}(*)';

Thanks for the great support!

@rixbeck
Copy link
Owner

rixbeck commented Jan 1, 2015

Is it means would your snippet improve the extension? If so would you like to make a pull request to be included? :-)

@Propaganistas
Copy link
Contributor Author

No, I'm reporting that CKEditor's allowedContent option parameter isn't working properly in Editable.

@rixbeck
Copy link
Owner

rixbeck commented Jan 2, 2015

Thank you. Then updated now.

@rixbeck rixbeck closed this as completed Jan 2, 2015
@Propaganistas
Copy link
Contributor Author

I think you misunderstood me. I'm reporting that the allowedContent parameter is not working as expected for <i> tags in Editable.
However, as a workaround I managed to use <span> tags instead of <i>.

@rixbeck
Copy link
Owner

rixbeck commented Jan 3, 2015

As I remember in CKEditor you can just enter tags which are enabled by corresponding toolbar or plugin, additional that are in allowedContent option. Although I thought that your snippet is a workaround for this, but I think if <i> tags can't be managed in Editable then it isn't an extension related issue but a problem in CKEditor. I would be curious how it is managed in Bolt backend's content editing. Do you agree with? Or what option do you suggest we better to use in Editable?
I must confess I'm not a great fan of CKEditor so I didn't dig in details of its configuration...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants