I'm wondering if there is some sort of element (preferably jQuery since this library is used) which enables online editing in a (converted) textarea. Basically what I'm looking for is a framework for textarea tabbing and syntaxhighlighting for basic online source-code editing that I can embed in my site. Any suggestions? My Google attempts result in RTE-editors having a 'show code' button which is not what I'm looking for, obvious.
CodeMirror is the serious alternative to ACE. It's used by various projects, including jsFiddle (mentioned in another answer), jsbin and Google Code.
If you want something you can embed on your site, try ACE. Here's a demo.
Sounds like jsfiddle.net may give you what you're looking for.
Related
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.
I am a beginner in HTML5, CSS3, and JavaScript. I reached my limit for the use of the trial version of Microsoft's OneNote. I like the program so much, I want to make an equivalent of it as an html version so I won't have to empty my pockets for the paid version.
The part I need help with is the part where you type in your notes. I don't know how to make a text edit field in html. Is it possible to do something like that? I would be satisfied if it could only do the same functions as note pad. Just so long as I am able to do the simple type and edit functions. Can someone show me how to code this or lead me to a site that teaches something like this?
Thanks! Tony.
There are plenty of solutions out there. Nicedit, CKEditor, etc. These all have a Rich text interface, and are javascript managed.
The simplest solution would be to just use a <textarea> which would allow for plain text input only.
The simplest way is to use the <textarea> tag in HTML. See this link too.
You can also use HTML5 Data caching to save your notes locally through your browser after implementing your textarea tags.
Here's a neat little plugin that should be relatively minor to install/use.
https://github.com/ekdevdes/storage.js
I need a textarea that looks more like an programing environment, like notepad++. Basically, all I want is to insert TABs and keeps the cursor in the same indenting level as the previous line.
Any help on building my own would be greatly apreciated as well (my javascript/jquery skills are very basic).
thanks (:
Code Mirror would be a great option, it's easy to use with your skills.
You can also check this Wikipedia post for more information. http://en.wikipedia.org/wiki/Comparison_of_JavaScript-based_source_code_editors
Good luck ;)
Take a look at this link which will help you decide which editor to use based on your requirement. It has provided wide variety of JavaScript based editors with support for various browsers.
http://en.wikipedia.org/wiki/Comparison_of_JavaScript-based_source_code_editors
You can try this plugin for TABs http://teddevito.com/demos/textarea.html
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.
I know they're using a jQuery plugin, but I can't seem to find which one they used. In particular, what I'm looking for is autocomplete with exactly the same functionality as SO's autocomplete, where it will perform an AJAX command with each new word typed in and allow you to select one from a dropdown.
Note that the tag editor has been completely re-written now, and no longer resembles the original, simple text box w/ suggestion drop-down that adorned the site for nearly three years.
If you're interested in the new form, see this Meta question: https://meta.stackexchange.com/questions/102510/can-i-use-the-tag-textbox-script
Autocomplete is the plugin used originally, albeit with various tweaks and customizations made to it over the years.
You might also like this one:
http://code.google.com/p/jquery-autocomplete/
Read the history here: http://code.google.com/p/jquery-autocomplete/wiki/History
Have a look at SO_Tag, a tagging system based on StackOverflows tagging system.
And Github.