Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/afeiship/react-codeflask
A micro code-editor for awesome web pages.
https://github.com/afeiship/react-codeflask
code codeflask codeforces editor highlight live react
Last synced: 2 months ago
JSON representation
A micro code-editor for awesome web pages.
- Host: GitHub
- URL: https://github.com/afeiship/react-codeflask
- Owner: afeiship
- License: mit
- Created: 2016-02-29T09:52:48.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-08-19T08:14:30.000Z (5 months ago)
- Last Synced: 2024-10-12T15:21:39.103Z (3 months ago)
- Topics: code, codeflask, codeforces, editor, highlight, live, react
- Language: TypeScript
- Homepage:
- Size: 288 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# react-codeflask
> A micro code-editor for awesome web pages.[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]## installation
```shell
npm install -S @jswork/react-codeflask
```## usage
1. import css
```scss
@import "~@jswork/react-codeflask/dist/style.css";// or use sass
@import "~@jswork/react-codeflask/dist/style.scss";// customize your styles:
$react-codeflask-options: ()
```
2. import js
```js
import React, { useState } from 'react';
import ReactCodeflask from '@jswork/react-codeflask';
import '../../src/components/style.scss';
import styled from 'styled-components';
// import 'prismjs/themes/prism.css';const Container = styled.div`
width: 80%;
margin: 30px auto 0;> .is-actions {
margin-top: 10px;
}
`;export default () => {
const [val, setVal] = useState(
`curl 'https://api.cdnjs.com/libraries/backbone.js/tutorials/this-tutorial-doesnt-exist' | json`
);
return (
{
// console.log('current value:', e.target.value);
setVal(e.target.value);
}}
/>
{
setVal('const for="bar"; \nlet bar="bc";');
}}>
Set value.
);
};```
## preview
- https://afeiship.github.io/react-codeflask/## license
Code released under [the MIT license](https://github.com/afeiship/react-codeflask/blob/master/LICENSE.txt).[version-image]: https://img.shields.io/npm/v/@jswork/react-codeflask
[version-url]: https://npmjs.org/package/@jswork/react-codeflask[license-image]: https://img.shields.io/npm/l/@jswork/react-codeflask
[license-url]: https://github.com/afeiship/react-codeflask/blob/master/LICENSE.txt[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/react-codeflask
[size-url]: https://github.com/afeiship/react-codeflask/blob/master/dist/react-codeflask.min.js[download-image]: https://img.shields.io/npm/dm/@jswork/react-codeflask
[download-url]: https://www.npmjs.com/package/@jswork/react-codeflask