set CKeditor config.stylesSet for specific editor - ckeditor

I have added a styles list with the config.styleSet.add function and now i can add this style list to the CKeditor with the config.stylSet function, but i can't find anything in the manual about how to implement that to a specific editor.
Any ideas?
Thanks!

Sorry that was a dumb question. the simple answer is:
Add stylesSet: 'stylesName'
To that editor configs.
The reason i didn't success with that is that i was mistakenly writing "styleSet" instead of "stylesSet" :~

Related

How can I disable a custom toolbar button in CKEditor 5?

I implemented a version of the image insert Simple Plugin example from CKEditor 5's framework docs.
But the example doesn't cover how to disable the item when the editor's isReadOnly property is set (like it does by default for all the standard buttons). I found docs for an isEnabled prop as well as a bind method for ButtonView, but it quotes examples using a command item, rather than a view item. Problem is, the Simple Plugin example doesn't create a command to bind to.
So question is whether I need to create a command, or if there is some other way to make the view item's state sensitive to the readonly state of the editor instance.
Thanks, and my apologies if I've left out any needed context (new to posting here on SO). Feedback is welcome (and I know y'all will whip me into shape).
D'oh, I think I figured it out:
view.bind('isEnabled').to(editor, 'isReadOnly', isReadOnly => !isReadOnly);
Just needed to bind to the observable property of the editor. Seems to be working as I desired/expected.

Make CKEditor 5 accept <br> or inline styles

Lokking through the documentation of CKEditor5, I could not find instructions on how to allow <br> tags.
I read somewhere online that you can use inline styles like style = "margin:0px" but it strips those as well.
Any help would be greatly appreciated.
The soft line break feature is on the project's TODO list. Please leave your comment in the GitHub issue so we can understand your useā€“case better and provide the best possible solution.
Saw somewhere online where you can use inline styles like style="margin:0px" but it strips those as well!
Read why the editor does so in the project's FAQ. Anyway, I strongly advise you to use global styles sheets instead of inline styles because they are against the idea of the semantic content. All the more that your style is associated with the layout (margin, spacing), not the content itself (font color, font size). CKEditor 5 is a content editor, not a layout editor.

How to display autocomplete choices in swagger-editor

How do you get autocomplete to work in the YAML editor view of swagger-editor? I see autoComplete: true in preferences.js. What do you need to do in the editor to get the snippet to appear?
I think I figured it out. swagger-editor sets enableLiveAutocompletion: true for the ACE editor (app/scripts/services/editor.js). For some reason, this disables live auto completion(!) Setting it to false enables it. Now as I type I can see the autocompletion selections and can insert snippets. Strange that this option seems reversed.
Thanks to this answer https://stackoverflow.com/a/27828826/2525213 for helping me figure this out.

Ask for OJS theme footer

Really thank you for pointing as he could not add themewas activated. I would like to ask your opinion if you know how I add a footnote to the style of this website:http://www.methaodos.org/revista-methaodos/index.php/methaodos
My question is, there are modules that you create thisfootnote? Or on the contrary they should be within thetemplate theme?
Thanks again beforehand.
I don't know, if I understand your question correctly. If you would like to add a footnote to your OJS, you can co to /index.php/ip/manager/setup/5. There is an option for this.

TinyMCE: Automatic add style attribute on link creation

In TinyMCE, I need to add a in-line style attribute on link creation. The reason is that Google Mail doesn't support tags in a newsletter.
One solution can be "advlink". But who would explain to our user...that he must add css code in a new link...bad solution.
There must be a simpler, user-friendly way, but i can't find it. Is there an option that i can tell the plugin to add automatic style-attributes to a link?
//EDIT
Ok, i think another solution can be, if i can add anchor to 'style_formats'. But an anchor is not supported in 'style_formats'...someone has an idea?
You may write an own plugin which adds the inline style element to links.
An easier approch is to put the necessary code into the setup config paramter.

Resources