Code Monkey home page Code Monkey logo

simditor-fullscreen's Introduction

simditor-fullscreen

Simditor扩展,将编辑器全屏

如何使用

常规加载

在Simditor的基础上引用 simditor-fullscreen 的脚本

<script src="js/simditor-fullscreen.js"></script>

配置

new Simditor({
    textarea: textareaElement,
    ...,
    toolbar: [..., 'fullscreen']
})

AMD模式加载

引入require.js

<script src="bower_components/requirejs/require.js"></script>

在require.js的入口 配置 simditor-fullscreen

 require.config({
    paths:{
      jquery: 'bower_components/jquery/dist/jquery.min',
      simditor: 'bower_components/simditor/lib/simditor',
      'simple-module': 'bower_components/simple-module/lib/module',
      'simple-uploader': 'bower_components/simple-uploader/lib/uploader',
      'simple-hotkeys': 'bower_components/simple-hotkeys/lib/hotkeys',
      'simditor-fullscreen': 'lib/simditor-fullscreen',
    }
  });

使用simditor

  require(
    [
      'jquery',
      'simditor',
      'simditor-fullscreen'
    ],function($, Simditor){
      var editor = new Simditor({
        textarea: $('#editor'),
        toolbar: [
          //...
          'fullscreen'
        ]
      });
    });

使用bower安装

bower install simditor-fullscreen

查看 demo

clone 本仓库。

在仓库目录下运行

npm install
bower install
grunt

在浏览器打开index.html即可(requirejs 的demo为index-require.html)

Test

在ubuntu 14.04的 chrome和firefox 下测试通过.

History

v0.0.4

  1. 修复一个全屏bug , 当有其他组件设置了z-index

v0.0.3 1.增加快捷键绑定 esc

v0.0.2

  1. 支持2.1.5版本. (由于官方不在提供统一的图标处理,因此需要额外添加对fontawesome的依赖.具体可以参考demo: index.html)

v0.0.1

  1. 仅支持2.0 以上版本

simditor-fullscreen's People

Contributors

huyinghuan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

cellchen

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.