All Projects → rhysd → React Vimjs

rhysd / React Vimjs

Licence: other
Vim in Your Web App

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Vimjs

Xray React
React layout debugger.
Stars: ✭ 128 (-14.09%)
Mutual labels:  react-component
Kea
Production Ready State Management for React
Stars: ✭ 1,805 (+1111.41%)
Mutual labels:  react-component
React Border Wrapper
A wrapper for placing elements along div borders.
Stars: ✭ 147 (-1.34%)
Mutual labels:  react-component
React Sizeme
Make your React Components aware of their width and height!
Stars: ✭ 1,770 (+1087.92%)
Mutual labels:  react-component
Create React Component Folder
Creates react component folder structure
Stars: ✭ 139 (-6.71%)
Mutual labels:  react-component
Modern Wasm Starter
🛸 Run C++ code on web and create blazingly fast websites! A starter template to easily create WebAssembly packages using type-safe C++ bindings with automatic TypeScript declarations.
Stars: ✭ 140 (-6.04%)
Mutual labels:  emscripten
React Splitters
React splitter component, written in TypeScript.
Stars: ✭ 127 (-14.77%)
Mutual labels:  react-component
React Plaid Link
React bindings for Plaid Link
Stars: ✭ 148 (-0.67%)
Mutual labels:  react-component
React Share
Social media share buttons and share counts for React
Stars: ✭ 1,978 (+1227.52%)
Mutual labels:  react-component
Nbind
✨ Magical headers that make your C++ library accessible from JavaScript 🚀
Stars: ✭ 1,829 (+1127.52%)
Mutual labels:  emscripten
Antd Schema Form
Based on Ant Design, interactive forms can be generated through JSON Schema configuration. - 基于Ant Design,可以通过JSON Schema配置生成可交互的表单。
Stars: ✭ 137 (-8.05%)
Mutual labels:  react-component
Axui Datagrid
DataGrid, DataSheet for React
Stars: ✭ 138 (-7.38%)
Mutual labels:  react-component
Webscrypt
a fast and lightweight scrypt hash algorithm for browser
Stars: ✭ 144 (-3.36%)
Mutual labels:  emscripten
React Responsive Carousel
React.js Responsive Carousel (with Swipe)
Stars: ✭ 1,962 (+1216.78%)
Mutual labels:  react-component
Indigo
Universal cheminformatics libraries, utilities and database search tools
Stars: ✭ 146 (-2.01%)
Mutual labels:  emscripten
React Native Keyboard Accessory View
Keyboard accessory (sticky) view for your React Native app. Supports interactive dismiss on iOS.
Stars: ✭ 128 (-14.09%)
Mutual labels:  react-component
React Spinners
A collection of loading spinner components for react
Stars: ✭ 2,054 (+1278.52%)
Mutual labels:  react-component
Local Sqlite Example
Demonstrates database-driven Electron using local SQLite with SQL.js.
Stars: ✭ 148 (-0.67%)
Mutual labels:  emscripten
React Page Progress
🎉 Sweet Component powered by React Hooks 🚀 👉
Stars: ✭ 148 (-0.67%)
Mutual labels:  react-component
React User Tour
Give your user a guided tour around your application
Stars: ✭ 146 (-2.01%)
Mutual labels:  react-component

React TRUE Vim Component

Build Status

This is a Vim.js component for React.js. You can easily introduce Vim into your React.js web application.

Please try Markdown Demo. The source code of this demo is here.

Install

Install via npm.

$ npm install react-vimjs

Usage

Basic Usage

You can use <Vim> component.

  • index.js
import React from 'react'
import Vim from 'react-vimjs'

React.render(
  <Vim memPath="path/to/dist/vim.js.mem"> Loading... </Vim>,
  document.body
);
  • index.html
<html>
  <head>
    <meta charset="utf-8" />
    <title>Hello, react-vimjs</title>
    <link rel="stylesheet" href="path/to/dist/vim.css">
  </head>
  <body>
  </body>
  <script src="path/to/index.js"></script>
  <script src="path/to/dist/vim.js"></script>
</html>

You need to link vim.css in dist directory and load vim.js with <script> tag after loading your index.js. And set path to vim.js.mem as property of <Vim> component. <Vim> has many other optional properties. (Document is TODO)

Basically all files are put on memory so it is volatile after closing the page. Only .vimrc is saved to local storage.

Edit Local File

You can load local file with file chooser easily with <FileUpload> component.

import Vim,{FileUpload} from 'react-vimjs'

React.render(
  <div>
    <Vim memPath="path/to/vim.js.mem"> Loading... </Vim>
    <FileUpload onUpload={(dir, name) => alert("Loaded " + dir + "/" + name)}>
      <button type="button">
        Edit Local File
      </button>
    </FileUpload>
  </div>,
  document.body
);

Children of <FileUpload> component gets clickable. When clicked, <input> file chooser is launched and you can select a file. If onUpload property is set, it is called with the path to loaded file after loading the file is success. When blah.txt is selected, /root/blah.txt is created in Emscripten filesystem and you can open it with :edit blah.txt.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].