I am using trumbowyg wysiwyg editor in my laravel app. In the editor, upload option is not show though upload plugin is already installed.
You need to make sure you include a few things when you call the plugin.
btns: ['viewHTML',
'|', 'formatting',
'|', 'btnGrp-design',
'|', 'link',
'|', 'image',
'|', 'btnGrp-justify',
'|', 'btnGrp-lists',
'|', 'horizontalRule']
You also need to customise the image button to contain the dropdown
btnsDef: {
// Customizables dropdowns
image: {
dropdown: ['insertImage', 'upload', 'base64'],
ico: 'insertImage'
}
},
My example in full below
$('textarea').trumbowyg({
autogrow: true,
fullscreenable: false,
btnsDef: {
// Customizables dropdowns
image: {
dropdown: ['insertImage', 'upload', 'base64'],
ico: 'insertImage'
}
},
btns: ['viewHTML',
'|', 'formatting',
'|', 'btnGrp-design',
'|', 'link',
'|', 'image',
'|', 'btnGrp-justify',
'|', 'btnGrp-lists',
'|', 'horizontalRule']
});
Related
One of the fields in the OData feed I use is "Edm.Int16". I tried to filter the tiles containing the field but cannot find a correct syntax/filterOperator for it. I do believe I checked all possible combination from SAP API but no result.
I have no issues with strings filtering. The following code works as expected.
<TileContainer id="container1" tiles="{
path: '/myDataSet',
templateShareable: false,
filters: [
{
path: 'Today',
operator: 'Contains',
value1: '1'
}
]
}">
This code doesn't work (with quotes around the number and without; with different operators):
<TileContainer id="container2" tiles="{
path: '/myDataSet',
templateShareable: false,
filters: [
{
path: 'Sort',
operator: 'EQ',
value1: '0'
}
]
}">
I'm using summernote and sometimes I need fonts with higher value than is available in font-size list. This is my current code:
$('#summernote').summernote({
toolbar: [
['style', ['style']],
['fontsize', ['fontsize']],
['font', ['bold', 'italic', 'underline', 'clear']],
['fontname', ['fontname']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']],
['insert', ['picture', 'hr']],
['table', ['table']]
],
height: 585,
focus: false
});
I tried to put into toolbar fontsizes (numbers like 10,20,25,30) but it doesn't help. Is there a way how can I set my own custom fontsize list?
To set custom fontsize list, add this to your options: ) options:
$('#summernote').summernote({
fontSizes: ['8', '9', '10', '11', '12', '14', '18', '24', '36', '48' , '64', '82', '150']
});
I want to add several items in a select2 input field at once.
If I copy+paste "Hawaii Alaska" into the select-multiple example here, then I get:
No results found
In my case spaces are not allowed in the items.
Is there a way to insert N space sperated items via copy+paste?
Desired result: (x)Hawaii (x)Alaska
you can add token separators in your select2 to identify characters as stopping points for your tags/choices, but unfortunately it bugs on the last copy pasted item
//try copy pasting bug,invalid, enhancement, wontfix
//then try bug,invalid, enhancement
//you will see the problem
var data = [{ id: 0, text: 'enhancement' }, { id: 1, text: 'bug' }, { id: 2, text: 'duplicate' }, { id: 3, text: 'invalid' }, { id: 4, text: 'wontfix' }];
var placeholder = "select";
$(".mySelect").select2({
tokenSeparators: [',', ', ', ' '],
data: data,
placeholder: placeholder,
allowClear: false,
minimumResultsForSearch: 5
});
here is the codepen
http://codepen.io/anon/pen/dMWQbd
its opened as a bug in github on the library
https://github.com/select2/select2/issues/3458
I have a kendo mvc grid with a datetime column.
The filters for "is greater than" or "is smaller than" does work on the datetime cell values but NOT the "is equal to" filter.
I want to remove the isequal filter therefore.
How can I do this?
You can use filterable.operators.string option
<div id="grid"></div>
<script>
$("#grid").kendoGrid({
columns: [
{ field: "name" }
],
dataSource: [
{ name: "Jane Doe" },
{ name: "John Doe" }
],
filterable: {
operators: {
string: {
eq: "Equal to",
neq: "Not equal to"
}
}
}
});
</script>
Using MVC wrapper you can use:
.Filterable(filterable => filterable
.Extra(false)
.Operators(operators => operators
.ForString(str => str.Clear()
.StartsWith("Starts with")
.IsEqualTo("Is equal to")
.IsNotEqualTo("Is not equal to")
))
)
Got Datatable to work. Now trying to apply the extra Tabletools (so i can export table to csv).
I can see the export to csv. Am i missing something? I have applied(as suggested)
$(document).ready( function () {
$('#example').dataTable( {
"sDom": "<'row-fluid'<'span6'T><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
"oTableTools": {
"aButtons": [
"copy",
"print",
{
"sExtends": "collection",
"sButtonText": 'Save <span class="caret" />',
"aButtons": [ "csv", "xls", "pdf" ]
}
]
}
} );
} );
I am using the 'jquery-datatables-rails' gem, which it says it supports table tools.
Thank you
I guess your problem is that you miss the flash-object.
If it is 1.91. Add this to your dataTable{( code (you must realize that the path depends on your setup, so this is just an example)
sSwfPath: "DataTables-1.9.1/extras/TableTools/media/swf/copy_csv_xls_pdf.swf",