How to add line number to kendo ui editor. I dont see any setting to enable line number
http://docs.telerik.com/kendo-ui/controls/editors/editor/overview
There is a route using CSS3 Counters. I'm not familiar with the Kendo Editor, so be sure to add any other elements besides the p and ul > li base child elements in the CSS.
You can save the following CSS to be loaded within the editor:
body {
counter-reset: editor;
padding-left: 3em;
}
body > p,
body > ul > li {
counter-increment: editor;
}
body > p:before,
body > ul > li:before {
content: counter(editor);
background: #CCC;
position: absolute;
left: 1em;
height: 100%;
width: 2em;
}
To add custom CSS within the editor, you would save the above into a file and in your initialization:
$("#editor").kendoEditor({
stylesheets: ["path_to_your.css"]
});
Related
I'm using Foundation 6 for Sites to create a responsive site.
I failed to use pseudoelements ::after and ::before (I didn't forget about the content property).
My browser code inspector shows no pseudoelements and they are not implemented on the page.
Any ideas why it has happened and how to deal with it?
May it be a trouble with sass?
I use them all the time :)
You said you made sure you include the content: '' property inside the psuedo element, so that's good.
If the component is a Foundation CSS component and that element already uses a psuedo element, you can find it using the browser's inspector and see what CSS is targeting it.
Example:
.notification-reward {
align-items: baseline;
animation: jellyIn 1s;
display: flex;
position: absolute;
right: 0;
top: -58%;
&::after {
color: $primary-light;
content: attr(data-earned-points);
font-size: $stat-font-size;
font-weight: 700;
left: 4.3625rem;
position: absolute;
top: 6%;
}
&::before {
color: $primary-light;
content: '+';
font-size: rem-calc(44);
font-weight: 700;
left: rem-calc(40);
position: relative;
top: -1.6525rem;
}
}
How to auto change the span size so that it is equal to a div? image
.ui-jqgrid tr.ui-jqgrid-labels div {
white-space: normal !important;
}
See here jsfiddle.
There are such limitations in free-jqgrid 4.14.0? http://www.trirand.com/jqgridwiki/doku.php?id=wiki%3Agroupingheadar
Thank you
I suggest you to use the following additional CSS rules
.ui-jqgrid .ui-jqgrid-htable th.ui-th-column {
position: relative;
}
.ui-jqgrid .ui-jqgrid-labels > .ui-th-column > .ui-jqgrid-resize {
top: 0;
float: none;
position: absolute;
height: 100%;
}
.ui-jqgrid .ui-jqgrid-labels > .ui-th-ltr > .ui-jqgrid-resize {
right: 1px;
}
.ui-jqgrid .ui-jqgrid-labels > .ui-th-rtl > .ui-jqgrid-resize {
left: 1px;
}
see the modified demo https://jsfiddle.net/OlegKi/owypx8c5/1/. I added direction: "rtl" to the second grid to verify that new settings works with RTL languages too. I suppose it's not your case and you want remove it like in https://jsfiddle.net/OlegKi/owypx8c5/2/.
I will adjust ui.jqgrid.css to use the above settings as default CSS rules of free jqGrid.
I am using Joomla 3.6.5.
Using standard modules:
Using level 1 menu in the top.
Same menu but starting form level 2 (and more) to the left.
A standard breadcrumb in the middle to show articles (and it's "you are here" in the bottom).
I have 2 problems:
Dropdown (on selected) does not work when you begin at level 2. Either you have to see everything - and it's a very long list, or you can only see the level 2 items.
You don't see which menu item that is selected on the side menu.
Is there a way to fix this? Or maybe I have to download some more advanced menu plugin?
Got the second part to work (to see selected submeny item). Added this to template.css (row 3019):
.nav-pills > .current > a,
.nav-pills > .current > a:hover,
.nav-pills > .current > a:focus {
color: #fff;
background-color: #f2981d; /* Or standard #005e8d*/
}
.nav-pills ul a,
.nav-pills ul a:hover,
.nav-pills ul a:focus {
padding: 4px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.nav-pills ul > .current > a,
.nav-pills ul > .current > a:hover,
.nav-pills ul > .current > a:focus {
color: #fff;
background-color: #f2981d; /* Or standard #005e8d*/
}
Also had to change the Modules Menus - Menu Class Suffix to " nav-pills nav-stacked"
I'm trying to build a fairly simple Sass mixin for a dropdown menu built as an html list
My html is
<div class="parent">
<div class="name">My Name</div>
<ul>
<li>profile</li>
<li>logout</li>
</div>
then I have a mixin which is applied to the UL
#mixin dropdown() {
// create a dropdown list from a ul
position: absolute;
display: none;
margin: 0;
padding: 0;
list-style-type: none;
&:hover {
display: block;
}
li {
padding: 0;
background-color: red;
}
li a {
#include button();
padding-left: 0;
}
}
Then I am trying to simply make the css by including the mixin in the parent
.parent {
position: relative;
ul {
#include dropdown();
}
&:hover ul {
display: block;
}
}
The problem is that the mixin needs to set ul { display:block} when I hover on the parent so the css needs to read .parent:hover ul {displa:block} but of course, I'd prefer to have it assigned to the parent rather than add the class on the parent itself.
I thought I should be able to do * &:hover or .parent:hover & or something of that sort, but any combination I've tried has not worked.
Using .parent:hover & creates css of
header .parent ul:hover, .parent:hover header .parent ul {
display: block; }
Which is not right.
Suggestions? Without having to specify the parent element would be preferred.
Originally I was trying to put the mixin no the dropdown itself, but thanks to #cimmanon pointing out that I didn't include how I am using the mixin, I reconsidered the approach and have re-created the mixin to be applied to the parent, which works pretty well, but somebody may have a better way.
.parent {
#include dropdown();
}
#mixin dropdown() {
display: relative;
// create a dropdown list from a ul
&:hover ul {
display: block;
}
ul {
position: absolute;
display: none;
margin: 0;
padding: 0;
list-style-type: none;
&:hover {
display: block;
}
}
I'm having an issue where I cannot get my sub nav to hide until on Hover. I assume I accidentally just deleted some kind of css that I need, but I cannot for the life of me figure out what I did.
The link to the dev site is: http://fallriverbenefits.com/dev/
I solved this by adding this to the css:
.nav li ul {
position: absolute;
display: none;
width: inherit;
}
.nav li:hover ul {
display: block;
}
.nav li ul li {
display: block;
}