highlighting

Syntax Highlighting

这一生的挚爱 提交于 2019-12-04 09:44:18
问题 I'm looking for a general purpose syntax highlighting library, to output to html. It's for use within a ruby app, so a ruby library would be good, but an excellent utility which can be piped in and out of would do Also needs to guess the appropriate language to highlightsy by itself 回答1: HTML/CSS/JavaScript based syntax highlighter solutions are the most popular and work well with different server technologies including Ruby. SyntaxHighlighter (RECOMMENDED) is here to help a developer/coder

Highlighting Links

空扰寡人 提交于 2019-12-04 04:29:43
问题 I am creating a Help System that uses links (a JButton extension) that expand and collapse subpanels with JLabels in them. The links and the collapsible panels work, but I'm having trouble implementing my find dialog. I want to be able to highlight parts of the text for which the user searches. I think my use of text attributes to underline the text in the links is messing with my ability to highlight the parts of the text, but I'm not sure how to do it differently. Here's the code for my

Highlighting current navigation state in Backbone.js application

淺唱寂寞╮ 提交于 2019-12-04 03:22:28
I want to highlight the current navigation state. Like if the hashchange is #home , I want to style the 'Home' menu link differently and similarly other links. Backbone.js fires individual events like route:home ,... route:some-other when the #home and other links are clicked. I could not see any common event that will be fired for every hashchange. With this I m required to write the state highlight logic by binding to all the route events, which I think is not good solution. So, I've overridden Backbone.Router.route in my router sub class/object, like // override backbone' Router.route

Hightlight the ListView row when a contained UI element of row is touched

拜拜、爱过 提交于 2019-12-03 21:42:21
I want to enable the orange highlight that occurs when touching a listView row. If the onclick event was generated from the row itself, I can adjust the hightlight by setting the style of the listview. However in my case, the clicking event is generated by the TextView underneath with onclick event attached to it. When touch event occurs, Listview isn't aware of clicking is happening. It doesn't receive focused or pressed event. Is there bubbling or capturing technique I could use like Flex did? Or any suggestion/solution? Thank you very much. View tempView = null; // Class Variable to

UIWebView Text Highlighting solution

萝らか妹 提交于 2019-12-03 21:25:32
Has anyone found a solution for highlighting user-selected blocks of text in a UIWebView? I have a partial solution in place, however I have been unable to get it to work when the selection includes multiple elements in the DOM. In that case, I can find and highlight the first element in the selection, but javascript seems unable to tell me where the end of the selection is in this case. It may be that I just don't understand the selection objects completely. It's difficult to find good documentation on them. Tim Down You can use document.execCommand("HiliteColor") . I answered a similar

User-defined language not applying to specified file types in Notepad++

不打扰是莪最后的温柔 提交于 2019-12-03 17:33:36
问题 I have created a fairly simple user-defined language in Notepad++, and given it an associated extension. But, when I open files I have named with that extension, nothing happens. No syntax highlighting, or comment highlighting. Any idea what I have done wrong? The settings for the extension do not have a leading "." , as specified in the Notepad++ docs. 回答1: This has been fixed, so I guess the whole question could be closed or deleted. I'm not sure in which version they fixed it, but in the

Syntax Highlighting in Notepad++: How to treat a user-defined language as built-in?

蓝咒 提交于 2019-12-03 12:36:19
问题 This is a very minor issue that has nonetheless annoyed me for months. I've spent hours Googling it to no avail. To enable syntax highlighting of .ahk files in Notepad++, I've downloaded & imported an .xml file for AutoHotkey. The issue is that- to enable this highlighting- I have to manually select it from the "Language" drop-down. I'd like to it to be enabled whenever an .ahk file is opened, as it is for various other languages. I've tried adding the .ahk extension to the AutoIt language in

Highlight current row in JTextPane

情到浓时终转凉″ 提交于 2019-12-03 12:22:22
I'm trying for more than 2 days to implement a specific requirement for a text editor window... unfortunately without success so far :( The goal is to get a text editor window which will highlight the current row, like other text editors do. With current row I mean the row where currently the cursor/caret is positioned. I already found two different approaches but unfortunately I'm not able to adopt them so they work as expected. The first approach is to overwrite the DefaultHighlighter ( http://snippets.dzone.com/posts/show/6688 ). In the second approach the HighlighterPainter will be

Android listview no longer highlights selection onclick

a 夏天 提交于 2019-12-03 12:17:21
问题 I have a listview that was showing a yellowtint on items when I touched them. All I've done differently is change the background image in that listview xml , and now it no longer will show me the yellowtint Here is code the list view xml, it is just a textview with a background image: <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="10dp" android