Giter Site home page Giter Site logo

xiaoyin99 / tiny-editor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lipten/tiny-editor

0.0 0.0 0.0 9 KB

基于Ace可实时运行的代码编辑器,相当于开源的jsFiddle,可以打造属于自己的代码编辑器!

Home Page: http://codeasily.net/editor

CSS 18.29% JavaScript 67.82% HTML 13.89%

tiny-editor's Introduction

Tiny-editor

Demo:http://lipten.link/demo/editor

线上案例: http://www.codeasily.net/editor

-update v0.1-

1.测试版,目前有个别功能不稳定。


Usage

1、下载Tiny-editor

git clone https://github.com/lipten/Tiny-editor.git

2、引用相关文件

<link rel="stylesheet" href="Tiny-editor.css"/>

3、引用js文件

<script src="http://cdn.bootcss.com/ace/1.2.3/ace.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="Tiny-editor.js"></script>

4、html结构

//--html结构比较复杂,看下载后的editor.html比较完整

5、初始化代码

var Tiny = new TinyEditor()

Method

Tiny.tab(num)

tab显示第几个面板,num传序号,从1开始

Tiny.run()

运行结果并跳到result面板

Tiny.save()

保存代码至缓存

Tiny.fullScreen()

全屏模式开启或关闭

Tiny.dockMode()

dock边栏模式开启或关闭

Tiny.liveMode()

实时运行模式,发生change事件时执行一次,仅开启dock模式的前提下才能开启

tiny-editor's People

Contributors

lipten avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.