Everytime I'm putting HTML tags I need to wrap into a new element. I remember you can do this on Dreamweaver just inserting an element when you select something. Is there a way to do this with sublime text?
Select the text you want to wrap, and hit AltShiftW. It will initially be wrapped in <p> tags, but you can just type the tag you want and the tags will automatically change.
Related
For the various kendo editor tools like List, Table etc. we need to change the content before its inserted into the editor. For example, add a CSS class to a UL element or add some data properties.
How do we achieve this? We looked at the command event, however, changing values of the command does not seem to have any impact in the final HTML that is inserted into the editor.
I have a dataset in which one of the column has html tags. When I try to bind the data column with a cell inside a table, the data is being displayed as it is - I see the html tags like < br >,< br > in the cell. Is there a way I can get rid of the tags and display the data with proper formatting?
Yes.
But a data item does not work for this.
You'll have to use a text item, and inside the text item, reference the data as row["MY_COLUMN"] (you know, what I mean). It is important to switch the text item's Content Type from the default Plain to HTML.
Currently in CKeditor, the style drop-down let you wrap content with block or inline tags.
If you select multiples lines in the editor and chose a div element in the style menu, each lines will be wrapped individually in a div element.
Is it possible to select multiple lines and then wrap them in one div?
I use inline CKEditor for editing elements on my page. So when I click into DIV with some class, CKEditor is attached to it and when it loses focus, editor instance is destroyed. I need to insert HTML element into that DIV after CKEditor instance is destroyed - to the last position of cursor before destroying editor instance. So I basicaly need to know index of cursor in edited element's HTML, as it would be taken as a plain text (for this example below it would be 25). I don't want to modify original data.
I have HTML in my DIV like this:
"some <span>text</span> wi|th <b>html</b> tags" (where "|" is cursor position)
I tried to get range and extend it to the start of editable element:
var range = editor.getSelection().getRanges()[ 0 ];
range.collapse( true );
range.setStartAt( editor.editable(), CKEDITOR.POSITION_AFTER_START );
Here range.endOffset is 3 (the same as if I didn't extend range). But even if I sum up offsets of more elements, it wouldn't solve my problem, because it exclude HTML tags.
You won't be able to use ranges if you want to use them after the editor is destroyed, because while being destroyed the editor replaces editable's inner HTML with the data and they are not the same thing.
Instead, you should create a marker for the selection before the editor is destroyed and find this marker in the data.
See this topic for ideas how to achieve that: Retain cursor position after reloading the page in CKEditor.
in JQGrid 3.8, is it possible to have an icon instead of text in a column ?
I don't think it's possible but if you have a trick, i'd be happy
There are many ways to add icons in the grid. First way is: the data which be placed in the column header (colNames) or inside of the cell data could be HTML data. So you can easy insert the <img> element in the grid. One more method is th use custom formatters. See here some demos. If the standard jQuery UI icons contain all the icons which you need I would recommend you to use there.