How to display autocomplete choices in swagger-editor - 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.

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.

Can I disable CKeditor initializing on elements with contenteditable=true?

It seems that CKeditor automatically initializes on any element that has contenteditable=true. It even says so on their Guides page, but with no instructions on whether this can be avoided.
This makes me lose a lot of control over the content on my page. I have some content that should be editable with the rich text editor, and some other that shouldn't. But this makes CKeditor initialize on elements that don't even expect rich text, and they don't get saved as rich text in the database... So I need to get rid of it from the interface, but I don't know how...
Can I tell it to avoid automatic initialization?
The answer to the question is No.
The alternate solution, is to omit the contenteditable=true, then after initializing the CKEDITOR, set the contenteditable attribute on the required element from Javascript.
Try
CKEDITOR.disableAutoInline = true;
(See this answer from another question)

Remove header/filter-button columns from Telerik UI RadDataGrid

Much what the title says. When creating a RadDataGrid using TelerikUI in Xamarin.Forms, we get a "header column".
I know the style of can be set via the HeaderStyle property, and the text itself can be hidden by setting HeaderText to an empty string, but how do we actually remove the row of columns itself? Is this possible, with or without custom renderers?
We've tried setting the HeaderStyle to different attributes in hope that it'll fix it (hidden, collapsed etc), we've also tried emptying different properties/tags to try to achieve something similar to CSS's display: none but nothing has given us results as of yet. Any and all help appreciated!
Thanks.
If you want to hide the dots, you can set the Header Style:
<telerikDataGrid:DataGridTextColumn PropertyName="Country">
<telerikDataGrid:DataGridTextColumn.HeaderStyle>
<telerikDataGrid:DataGridColumnHeaderStyle OptionsButtonTextColor="Transparent"
BorderColor="#D9D9D9"
BorderThickness="1"/>
</telerikDataGrid:DataGridTextColumn.HeaderStyle>
</telerikDataGrid:DataGridTextColumn>
In addition, if you don't use any sorting or filtering, you can disable it through these properties
UserGroupMode="Disabled"
UserFilterMode="Disabled"
UserSortMode="None"

set CKeditor config.stylesSet for specific editor

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" :~

Sublime Text 2 - Autocomplete questions

I'm loving Sublime text but there are a few things I'd like to configure on the auto-complete:
HTML: Auto-completion of attributes within tags
When adding a class attribute to a div I have to do control+space to get the auto-complete list, is there a way of bringing that up automatically when adding attributes to tags?
HTML: Adding equals and quotes
When auto-completing the class attribute I then have to type the equals and quotes, can they be added automatically?
CSS: Auto-completion of property values
When I autocomplete a property, e.g. position I then have to add a space and press control+space or start typing to get the values autocomplete list. Is there a way of showing this list straight after the property autocomplete?
I've tried searching for an existing solution but can't find one, so I'm hoping there are some config files that I can amend! Any help pointing me in the right direction would be greatly appreciated! Thanks!
Darren
Try control + shift + p -> set syntax HTML in order to get auto-completion on html tags
also install: http://wbond.net/sublime_packages/package_control (streamlines package installation process)
and emmet: https://github.com/sergeche/emmet-sublime (makes writing html/css x times faster)
for more information on configuring sublime text you could check:
http://net.tutsplus.com/tutorials/tools-and-tips/sublime-text-2-tips-and-tricks/
and
http://net.tutsplus.com/articles/news/perfect-workflow-in-sublime-text-free-course/
Definitively for autocompletion install first Package Control and them Emmet from the Palette Command, just search "emmet" and Enter.
If you don't have Package Control installed, do that first. Next find the Tag package through Package Control via ST2 and install it. I believe that's the one you're looking for, otherwise Emmet (Zen Coding) could be the one I'm thinking of. Either way, make sure your document syntax is set to HTML.

Resources