I want something like a rich-text editor for my website that is for code (should be able to do things like syntax highlight, indent on the fly, show line numbers).
I like Mozilla Bespin, but it is quite unstable right now, and has a little bit TOO much functionality for me.
Anything else out there?
Just two days ago I learned of CodeMirror.
What are the odds?
Something like markItUp?
Related
I am trying to modify a js file (It's the first time I try it) and I got something very difficult to understand for me, a mess of inline code with no breaks.
I need it to be clean to be able to understand it, so I've been looking for a solution to break up the text into lines that represents something. I tried to split the lines where the semicolon are, but it didn't solved much.
I remember there where a program that was able to do something similar with css (I can't remember it's name).
Is it possible to do it with notepad++? if not, do you know which program can actually do it?
Thank you
Try using a code beautifier for your javascript, it is currently in 'minified' version.
Example: https://beautifier.io/
I am looking for a rich text editor that allows for code highlighting. I have worked on a BB-code system myself, and seeing as this topic turned out without any replies, I have not found a way (after countless of hours of searching) how to solve this. Therefore, I am bound to use an existing rich text editor, but it is important that it has the ability to add code snippets.
I am looking for a JavaScript or jQuery based one, since my server does not run ASP (or many other languages unfortunately).
Before I will get the reply "sigh repost", I have spend hours of searching and on topics regarding rich text editors, there were not any suggestions that have the ability to add code snippets, or they are using ASP. Therefore, my question is not a repost, so please don't bother commenting these replies!
If there are not any available, is there any way I can easily implement for example Alex Gorbatchev's Syntax Highlighter into a simple rich text editor? Or perhaps any other? If so, how would I go about doing this?
Basically, I am looking for a way to do something similar as the rich text box used on Stack Overflow (with code snippet syntaxing).
Thanks!
PS. If it is unclear what I am questioning, please refer to this topic, that might make things more clear.
Does anyone know what the JavaScript on Google's homepage does?
For such a simple homepage, there's a lot of code there! It's obfuscated and really quite onerous. I don't want to spend ages looking at it just to find it's doing something mundane.
Just thought that someone else may have looked at it already. Interested to know...
Cheers,
Steve
It's mostly your AJAX requests for autocomplete. Also, to make the search div box look like a text field. (It isn't a text field. Try pausing JS from the console, you'll see the cursor stop blinking.) Moreover, a lot of styling of it's UI elements.
im searching for a libary or suggestions for making a real time styler in javascript/jquery. The idea is that my users have a html text input, i need to detect in real time some patterns and apply an style to it, for example is the user writes #some_text all after the # should be considered like a tag a have to be bold like #some_text.
Im very new at javascript so i have no idea of where to begin, i did some research but i didn't find any already made libary. Thanks for any help and suggestions!
What about something like jQuery Tagit?
You could initialize it like this:
<script>
$(function() {
var availableTags = [
"#some_text1",
"#some_text2",
"#some_text3"
];
$('#tags').tagit({tagSource: availableTags});
});
</script>
<ul id="tags"></ul>
Something like that is used right here, on this website. Whenever you write a question or an answer in the editor, you get a live update in the area below. When you apply formatting it's updated in real-time in the preview area.
This uses a standard mark-up syntax called Markdown. What's good about that is that there are many tools that support Markdown, so you can find integrations for jQuery and even offline editors (Windows and Mac).
Check this question and its answers for some editors that do this.
Also check out the stand-alone version of the Stack Overflow editor.
maybe this helps you a little bit to understand what you have to do:
http://jsfiddle.net/EeGxs/3/
All I did is add an event listener to 'keydown' which means a key is pressed, and then you just have a look if there is a '#' in the line and if you add it to the p -tag which is bold.
Its only a demonstration.
If you've ever used www.jsfiddle.net, you might notice that it marks up code with proper colorings, and various other helpers like translating tabs to four spaces or shift-tab. With Firebug I see that it's doing this with an iFrame. Is there an open source library to do this? I want to let people write Python on a web page, but make it pretty like jsfiddle.
Check out CodeMirror.
Look here (SyntaxHighlighter)
Here you can find a simple tutorial.