highlighting

live highlight a word(s) with jQuery

China☆狼群 提交于 2019-12-07 23:54:47
问题 I want to live highlight words with jQuery. I use a live keyup event to trigger the highlighting, so that the highlighting changes upon entering words(using a input text field for this) I have found a piece of code which works fine but this code doesn't works with the live keyup event, so it wraps the first letter and stops there. Here is my HTML: <input type="text" id="input" name="input"/> <div id="content-block"><p>lorem ip sum </p></div> Here is my JS: $('#input').live('keyup', function()

Highlighting a class file in the package explorer in Eclipse

怎甘沉沦 提交于 2019-12-07 21:52:09
问题 I have developed a plugin for eclipse to add an option to the pop-up menu of the project. This option will search a class by name, then it should highlight the class in the package explorer. I have problem regarding the highlighting part. I search for the class in the folders, so i have the class path, but i don't know how to highlight it. I tried this but I didn't get any results: String path = "D:\\Programs\\eclipse\\runtime-EclipseApplication\\tessssst\\src\\testClass.java"; IPath iPath =

How to highlight a given text in TinyMCE?

无人久伴 提交于 2019-12-07 15:18:31
I have the following phrase: The birds fly in the sky near planes. 0123456789012345678901234567890123456 1 2 3 How can I highlight in the sky with TinyMce if I know the start(14) and end(23) of the phrase ? I would like to use the setRng method but I didn't find any sample code. Here is the solution I came up with : var ed = tinyMCE.activeEditor; var range = ed.selection.getRng(); range.setStart(textNode, start); range.setEnd(textNode, end); ed.selection.setRng(range); Where : textNode can be a DOM text node that you can retrieve with getElementById or any other short-hand properties ( parent

how to get span selected portion using Javascript

左心房为你撑大大i 提交于 2019-12-07 11:25:42
is there a way to get the highlighted selectionstart and selectedlenght on a span ? Thanks I use my own optimization of the algorithms in IERange , which provides a wrapper around IE's TextRange (which is what you get from the selection in IE) to give them the same interface as DOM Ranges. To get the selection in the document, use something like the following: var sel = window.getSelection(); // Provided by IERange in IE, built-in in other browsers var range = sel.getRangeAt(0); // Note this doesn't work in Safari 2 range now has properties startContainer and startOffset , which are

DOM Parser to highlight keywords not working

吃可爱长大的小学妹 提交于 2019-12-07 10:27:52
问题 This question is related with one I have made before but because the topic is now closed and I need to ask something further I will start a new question by hoping that's fine. In my previous answer I simplified the problem enough and resulted in simple but not fully working solutions. I realized it these days when I was implementing my code. The problem with the solutions in the previous post is that the HTML tags are broken by the replacing functions. I have read in many posts of this site

Where to put .tmLanguage in sublime text 3?

↘锁芯ラ 提交于 2019-12-07 09:36:55
问题 I'm having trouble with Ruby syntax highlighting in combination with RegExp. Someone suggested that I update my Ruby.tmLanguage file with some additional code. Problem is, I can't locate this file on my computer. Inside sublime_text_3/Packages I only see .sublime-package files, which I can't properly open with sublime text; it only shows numbers. Do I have to create this file myself, and if so, where? Or does this work differently in sublime text 3 (as opposed to 2, which was probably the

Work with Fast Colored TextBox for Syntax Highlighting in WPF

跟風遠走 提交于 2019-12-07 04:51:07
问题 Is it possible to work with Fast Colored TextBox for Syntax Highlighting in WPF. http://www.codeproject.com/Articles/161871/Fast-Colored-TextBox-for-syntax-highlighting I could not find an example that works with WPF c#. 回答1: Yes, but you will have to use the WPF component called WindowsFormsHost . In the code you create an instance of the FastColoredTextBox and add it to the windows forms host object like the example below: FastColoredTextBox textBox = new FastColoredTextBox();

Quickly highlight a column range in vim

谁说胖子不能爱 提交于 2019-12-07 03:14:46
问题 When working with positional data files, it is often very useful to highlight a specific column. In such files it is quite common to have huge "areas" filled with spaces (or NULL values) and only very sparse data points. In such cases it becomes difficult to read the file. Here's an example excerpt: 462 63082 01089 75518 735301 53473 017146 37217 07 940376 762 2842 88331 40680 8928 645718 0131 03522 47210 27431 93837 8825072 49479415 52084 8940 0591705 205635 525429 65339 300 0397 1983 0

Solr query in a pdf file, is not returning highlighting content

会有一股神秘感。 提交于 2019-12-07 02:35:30
I have implemented solr 6.5.1 today in my debian server but I have trouble getting the pdf text content. The searching is ok, because the document appears ok in when I query for example my name: "juan". However, the does not appear with each str result how it supposed to do. This is the example query: http://localhost:8983/solr/ex/select?q=juan&fl=title&wt=xml&hl=true&hl.snippets=20&hl.fl=content&hl.usePhraseHighlighter=true And this is the result: <response> <lst name="responseHeader"> <int name="status">0</int> <int name="QTime">1</int> <lst name="params"> <str name="hl.snippets">20</str>

MFC: How to change color/boldness of inidividual rows of ListCtrl?

别说谁变了你拦得住时间么 提交于 2019-12-07 02:07:25
问题 Using MFC and Visual Studio 2010 C++. I need a way to make certain individual rows of a CListCtrl stand out (however I do not want to use the built-in selection capability to highlight the rows). It could be the color of the row background, or font weight, or possibly even an image (if that is performant). Ideally I want to know how to do this using the stock list control. However, if this is not possible then let me know of a way using 3rd party code. UPDATE Here's the code I ended up using: