Custom syntax highlighter for HTML with line numbers [closed] - javascript

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I want to have a large input text area that I can type in something. Just like in JavaScript IDEs, when I type in syntax, I want them to be highlighted as we type. In the left hand side, line number should be displayed. Because I'm using this not for programming languages, I want to add new syntax. I found some JavaScript and CSS modules like prismjs, rainbows. But I'm not sure how can I use these to a something like <textarea></textarea> where I can type.

You should try CodeMirror. Their web contains all the necessary documentation to implement it in your website.

Related

How to parse a string that contains codes in React or Javascript? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 10 months ago.
Improve this question
I'm working on an app that might receive a string like this from the back end,
If you could fold a piece of paper in half 50 times, its' thickness will be 3/4th the distance from the Earth to the Sun.
as you see the string is not pure English and might contain code,
how to display this to the users?
like is there is any Npm package that might handle this for me?
You can use dangerouslySetInnerHTML for your tag while displaying the string with special characters.
Check this sandbox
As #Florian Sc mentioned in the comments, we need to be careful while using this.
react-html-parser is the alternative package which does the same thing. It does not use dangerouslySetInnerHTML in the background, it uses htmlparser2.

Does doxygen have better filter for JavaScript? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I know that Doxygen doesn't support JavaScript files. I have also looked at js2doxy.pl script and also this:
Documenting JavaScript with Doxygen
The first option(js2doxy.pl) is not producing relevant C++ code, it is also skipping all the prototype methods and leave them blank. The second option is working but not for prototype based programming. I am looking for a filter which can support prototype based(OOP) JavaScript files. I researched a lot about it but I failed to find a better filter.
Thanks in advance!

is it possible to use JavaScriptSpellCheck in jsp pages? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I would like to perform Spell Checking on textarea and like to show invalid words onchange. For this i found JavaScriptSpellCheck plugin but looks it will not support for jsp pages. is it? if, yes please suggest one good plugin to make my work easier.
Yes, there are many tools available for spell check in JSP pages.
Use RapidSpellCheck by Keyoti. It is easy to understand and use

Generate string in different languages in javascript [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I can generate random string just like here.
But are there some tools to generate same string according to user language? So you can just pass language code and get a string?
This problem is called "internationalization" or i18n.
If you google "javascript internationalization" you'll find several projects that could help, including:
http://i18next.com/
http://formatjs.io/
https://slexaxton.github.io/Jed/
I've used Jed before and it worked well for me.

JS libraries to prettify/ highlight the HTML Code syntax automatically? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I want to add some code to my website (Code to explain to learners or like on W3School and NOT for any text-editor). I can do so, but what I want is that the colors of the various tags, or attributes to change in color by themselves so that code looks beautiful (and Self explanatory to anyone trying to learn any web-designing coarse on my blog or website). Please see the image below:
Can someone suggest me any css,js,or any other extension to include which automatically prettifies my code like this?
Try this for automatically color your code: http://alexgorbatchev.com/SyntaxHighlighter/
For quickly tidying up your code you can use http://jsfiddle.net/
Just insert the code and press "tidy up"

Categories