Can any Texter users answer this question? - html

I have recently started using the excellent Texter. I wanted to set up a shortcut for creating html comments. However that it seems that the exclamation character (!) has special significance in the program, and so does not come out in script mode.
This character is of course required for...<!-- html comment here -->
Here is the code I tried to create the shortcut...
{HOME}<!-- {END}{BS} -->
Just wondering if there is a way of getting around this problem??
Cheers

"To send the literal forms of the special characters above, just wrap them in the same curly brackets." So something like {HOME}<{!}-- {END}{BS} -->. From Lifehacker.

Related

Store arbitrary characters in Semantic MediaWiki

I'm trying to store some text containing html tags into properties, which doesn't work. I created a form for a property with the data type 'text' and a template. Saving the form writes the text into the template, but it can't get displayed, as it contains illegal characters, as I guess.
What I'm trying to do:
I need a form to enter data, containing html tags and special
characters
I'd like to be able to use a query to find all those pages
and show that text using a template I provide to the ask query.
I also tried to use the free text option, but then I can't retrieve it using the ask query.
What would be the best, or at least a working solution to this?
Thanks a lot
storing text with html tags is a bit tricky in SemanticMediaWiki
The reason is the invention of the StripMarkers UNIQ/QINU by the MediaWiki developers.
When parsing the content of page with html tags in it the parsing is sort of "postponed". This technical detail unfortunately makes it hard for extension developers like the SMW developers to solve the issue of handling such content. Also it makes it hard for lay people to follow the discussion on how to solve the problem
Here are two examples of SMW Issues that are marked as "closed". This state of affairs means that by following the configuration hints in the issue your problem should be solved. If not please ask a question on the SMW issue list or even initiate the reopening of the issues.
https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/794
https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/3707
On my wiki we ran into this and resolved it by replacing special characters (we had issues with [ ] =, but the same problem happens with to < > tags too) with alternate unicode characters using the regex extension and a template before setting the property with {{#set:}}. If you want to display the formatted text on the wiki directly then call that parameter separately without replacing the unicode characters.
When you want to display the property, you can then run the reverse replacement with regex before displaying your now intact code (using the template result format to allow you to perform the operation on the output of the query).
To switch to special characters you can create this template
{{#regex:{{#regex:{{#regex:{{#regex:{{#regex:{{{1|}}}|/=/|꞊}}|/\[/|[}}|/\]/|]}}|/>/|≽}}|/</|≼}}
And to switch back you can use this as a template
{{#regex:{{#regex:{{#regex:{{#regex:{{#regex:{{{1|}}}|/꞊/|=}}|/[/|[}}|/]/|]}}|/≽/|>}}|/≼/|<}}

Matching backticks/accute accents for ES6 template literals should appear immediately in VS Code

When I enter an apostrophe / single quote in VS Code, VS Code will automatically add a second one and put the cursor in between of the two. I want the same behaviour when I enter the acute accent `. By default, it will not show anything at first in order to allow creating special characters such as è. That might be useful in other applications, but definitely not needed in VS Code. Is there a way to fix that?
It's mostly an aesthetics thing, but I find it distracting when writing code.

Words showing differently in the browsers

I am working on a site which has some Norwegian words. When I used "På" inside a <span> it is showing as "PÃ¥" in the browser.This is happening only for a particular page. For others it is working fine.I have tried to copy-paste from other working pages.But had no effect.It is showing "PÃ¥" instead of "På".Why this is happening?
you need to use &aring insead of å
see this link for html codes-
http://www.ascii.cl/htmlcodes.htm
Try converting your special characters to equivalent HTML entities using this converter
The character encoding of the page is wrong: the real encoding differs from the declared encoding. Using entity references for all non-Ascii characters would hide the symptoms (with the pertaining risk that later on, when someone inserts an “å”, things go wrong again). But the solution is to remove the conflict.
Check out the tutorial Declaring character encodings in HTML. If you need further help with this, posting the URL (not just copy of all code) is essential.

OK or ACCEPTED symbol in HTML?

Can somebody please help me, I want to put the "OK" symbol throw HTML not as image, by saying "OK" symbol I mean this symbol (http://awesomescreenshot.com/0272k1125)
Can somebody help me and tell me what code is this in html please ?
Thanks
There is a Unicode character that looks like a check mark: ✓
To use it in HTML, you'll probably want to escape it. The code looks like this:
✓ <!-- in decimal -->
✓ <!-- in hex -->
There is also a "heavier" (bold) version of this same symbol: ✔
Again, the escapes are:
✔ <!-- in decimal -->
✔ <!-- in hex -->
But definitely pay attention to the concerns expressed by the other answers regarding the inclusion of this character with the font(s) you're intending to use, and the possibility that the character may not display correctly on client machines.
As I understand, you want to put the Unicode CHECK MARK (U+2713) symbol on your page. However, I'm not fully sure that this character is implemented in most fonts, so it is possible that the character will not appear on some client browsers.
If you want to use the CHECK MARK character, it’s U+2713. The way to enter it depends on your authoring environment; the character reference ⅳ can be used instead, but it reduces source legibility.
The CHECK MARK character is present in many fonts, but not all. Its font support does not include any font that is available in Windows PCs, unless Microsoft Office has been installed. In addition to this primary concern, some browsers may fail to display the character even if it is available in some font; using CSS you can increase the odds.
The two-letter abbreviation “OK” works much more reliably. Though originally an English abbreviation of obscure origin, it is widely recognized. The CHECK MARK is more questionable, even though people usually know it from web page forms where it appears in checked checkboxes. But it’s not really universal; when I was at school, a symbol like CHECK MARK indicated an error, not acceptance.

How can I take an xml string and display it on my page similiar to how StackOverflow does it with 'insert code'?

I'm using the DataContractSerializer to convert and object returned from a WCF call to xml. The client would like to see that xml string in a webpage. If I output the string directly to a label, the browser strips out the angle brackets obviously. My question is how can I do something similar to StackOverflow? Are they doing a find & replace to replace angle brackets with their html entities? I see they are doing a code tag inside a pre tag and then making spans with the appropriate class. Is there an existing utility out there I can use to do this instead of writing some kind of parsing routine. I'm sure something free must be out there. If anyone can direct to the right place or some code that can easily accomplish this, I would greatly appreciate it. I apologize if this is more of a meta.stackoverflow question. Thanks for any tips.
The basic answer is that to get HTML displayed as typed, special characters and all, you need to replace the special characters (<, > etc.), with their escaped equivalents (>, < etc.). Beyond that if you want syntax colouring you'll have to parse the input to identify the keywords etc.
A full list of the special characters and their escape codes can be found here, but this is just one site of many.
you're talking about "pretty print".. if you want to diplay source code you could use this link 16 Free Javascript Code Syntax Highlighters For Better Programming
But if you want to display only xml.. there are some functions on the web that could help you with that, like this one: XML PHP Pretty Printer
and dont forget the special characters =)
good luck