You only need a line of code to easily implement an online editor _ javascript skill

Source: Internet
Author: User
Enter a line of code in the address bar of the browser: data: texthtml, & lt; htmlcontenteditable & gt; and press enter to change the browser to a temporary Editor (the browser must support the HTML5 attribute contenteditable, the Technology House gives people the impression that they are not talking, they can't understand what they want, and they keep their distance from each other. As a half-programmer, I think the real technology house has been entertaining for most of the time. It is the same as the geeks of most people. programmers also love to joke, I also like cooking and cooking. Although most of them are for decompression, it seems similar to ordinary people.

Different from each other, the Technology House advocates the ultimate, prefers minimalism, and hopes that simplicity is not simple. The technology house is constantly trying. I am watching a good show:



"Programmer Jose Jesus Perez Aguinaga shared a tip in CoderWall: enter a line of code in the browser address bar: data: text/html,Press enter to change the browser to a temporary Editor (the browser must support the HTML5 attribute contenteditable ). Many programmers, inspired by Jose, began to process and transform this line of code. For example, they changed to an editor that supports Ruby syntax highlighting ...... "

From the introduction, we can see that it is only a short piece of code: data: text/html,After constant transformation by programmers, a simple editable page is gradually transformed into a code editor that supports highlighted Java, Ruby, Python, and other programming languages, as of the last update in less than one hour, I have seen one and notepad. the functions of the cc website are similar, and the online editor of the content stored by the third-party website database API service is used:

The Code is as follows:


Data: text/html,


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.