What does the enableBasicAutocompletion option for Ace editor do? I tried setting it to true and false but were not able to observe any difference.
enableLiveAutocompletion does show a drop down list of suggestions for me when enabled.
This is how I am setting the options:
ace.js and ext-language_tools.js are loaded.
Then:
ace.require("ace/ext/language_tools");
var editor = ace.edit('someid');
editor.setOptions({
maxLines: Infinity,
minLines: 7,
enableBasicAutocompletion: true,
enableLiveAutocompletion: true
});
editor.setTheme("ace/theme/tomorrow");
editor.getSession().setMode("ace/mode/javascript");
It enables opening popup with ctrl-space see https://github.com/ajaxorg/ace/blob/v1.1.4/lib/ace/ext/language_tools.js#L175
Related
I am building a custom plugin with two tabs in CKEDITOR 4.11.1. In the first tab, there are some selects. Every time there is a selection I need to create inputs in the second tab. The following code updates the elements of the tab, I checked in the debugger but it does not display the element.
CKEDITOR.dialog.getCurrent().definition.getContents("tab_review_items").add({
type: 'text',
id: 'input_6',
label: 'Test input',
style: 'height: 15px',
widths: [500, 50],
labelLayout: 'horizontal',
});
Any suggestions on what other options I could try would be very helpful. Thank you.
Hi I am using jqGrid for showing the grid values dynamically but i need to hide edit add option showing only based on logged in user role but in navGrid I am not able to place the if and else condition please help me my code is:
.navGrid('#pagernav',
{
edit: true,
add: true,
del: false,
search: true,
refresh: true,
closeAfterSearch: true
},
In the above code edit and add options needs to display only based on logged in user example logged in user is admin this options need to display otherwise it has to disable
You have many options to implement your requirements:
1) The most easy implementation if you could set some JavaScript variable, like for example the global variable isReadOnly, based on logged in user role. Then your could could be just like
.navGrid('#pagernav',
{
edit: !isReadOnly,
add: !isReadOnly,
del: false,
search: true,
refresh: true,
closeAfterSearch: true
}
2) You can create the navigator bar with Add and Edit buttons and to hide there depend on some conditions, which you evaluate later dynamically. You need just execute the code like $('#add_list,').hide() or $('#add_list,#edit_list').hide(), where the list part of the id is the grid id. See the old answer for more details.
3) You can use the same ids of the Add and Edit buttons, like in the way 2, but remove the buttons instead of hiding there. You need just use jQuery.remove method instead of jQuery.hide.
When editing content that includes a table in ckeditor, it shows a border around table cells even though there is no border in the markup. This seems to be a convenience feature, so I'd like to be able to toggle it, perhaps via a checkbox in the toolbar. Is this possible? Perhaps there is a plugin of some sort that I have not configured? Thanks for your help.
Screen shot of table borders
This this best example to hide table border. Key player is : startupShowBorders: false,
$(function () {
var editor = CKEDITOR.replace("textarea", {
width: 750, height: 500, fullPage: true,
extraPlugins: 'stylesheetparser',
allowedContent: true,
qtBorder: '0',
startupShowBorders: false,
////pasteFilter: 'semantic-content',
//// Custom stylesheet for editor content.
//// contentsCss: ['content/css/html-email.css'],
//// Do not load the default Styles configuration.
stylesSet: []
});
});
I have a kendo window that contains a kendo numeric text box:
$('input').kendoNumericTextBox({
decimals: 2,
spinners: false
});
$('#win').kendoWindow({
modal: true,
width: "969px",
height: "646px",
title: "NumericTextBoxTest"
});
$('#win').data('kendoWindow').center().open();
The jsfiddle is here http://jsfiddle.net/e6shF/40/.
In Firefox, you are unable to highlight the numeric text box value. In Chrome, you can highlight the value but can't type over the value while it is highlighted.
It appears to be a focus issue due to improper z-indexing. I'm using kendo version 2012.3.1114 (latest GPL release). This issue is no longer present in kendo version 2012.3.1315 but that version doesn't appear to be available under GPL. How can I resolve this issue using kendo 2012.3.1114?
Adding a .focus() event listener to the input, wrapped in a setTimeout with an input.select() seems to force it to behave normally.
$('input').kendoNumericTextBox({
decimals: 2,
spinners: false
}).focus(function() {
var input = $(this);
setTimeout(function() {
input.select();
});
});
Fiddle: http://jsfiddle.net/HwrzV/1/
Works for me now in Firefox and Chrome. Tried to test IE8 but JSFiddle doesn't load. :x
I have advanced search button outside the jqGrid. I am using:
var pSearch = //How do I get this object as mine is constructed in c# code. How do I get it from jqGrid's property collection or options??
$("#list").jqGrid("searchGrid",pSearch);
The typical usage of searchGrid would be
$("#list").jqGrid("searchGrid");
or
$("#list").jqGrid("searchGrid", {multipleSearch: true});
because all really important options on the Advanced Searching dialog are inside of colModel.
I personally prefer the first form and set just common settings by $.jgrid.search for the searching in some JavaScript file which I include on every page of the project. For example
$.extend($.jgrid.search, {
multipleSearch: true,
multipleGroup: true,
recreateFilter: true,
overlay: 0
});