All Projects → asika32764 → fongshen-editor

asika32764 / fongshen-editor

Licence: GPL-2.0 license
A highly customizable code-inserting editor for markdown or other languages

Programming Languages

PHP
23972 projects - #3 most used programming language
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to fongshen-editor

streamlit-ace
Ace editor component for Streamlit.
Stars: ✭ 130 (+271.43%)
Mutual labels:  ace, ace-editor
macos-snippets
Snip is a lightweight snippets manager app for macOS
Stars: ✭ 238 (+580%)
Mutual labels:  codemirror, code-editor
ace-mode-solidity
Ace ( https://ace.c9.io/ ) Edit Mode for Ethereum's Solidity language ( https://solidity.readthedocs.io/en/latest/ ).
Stars: ✭ 25 (-28.57%)
Mutual labels:  ace, ace-editor
codemirror-editor-vue3
CodeMirror component for Vue3
Stars: ✭ 22 (-37.14%)
Mutual labels:  codemirror, code-editor
React Ace
React Ace Component
Stars: ✭ 3,342 (+9448.57%)
Mutual labels:  ace, code-editor
Vue Codemirror
⌨️ @codemirror component for @vuejs
Stars: ✭ 2,115 (+5942.86%)
Mutual labels:  codemirror, code-editor
wc-codemirror
CodeMirror as a vanilla web component
Stars: ✭ 31 (-11.43%)
Mutual labels:  codemirror
ClearWriter
A silent notepad.
Stars: ✭ 25 (-28.57%)
Mutual labels:  codemirror
owl-verbalizer
OWL verbalizer: making machine-readable knowledge also human-readable
Stars: ✭ 31 (-11.43%)
Mutual labels:  ace
Ngx Codemirror
Codemirror Wrapper for Angular
Stars: ✭ 192 (+448.57%)
Mutual labels:  codemirror
menote
A simple, beautiful Markdown editor powered by vue.js, ace, markdown-it. ✨
Stars: ✭ 56 (+60%)
Mutual labels:  ace
TW5-codemirror-plus
An attempt to make a better writing experience for TW using codemirror.
Stars: ✭ 26 (-25.71%)
Mutual labels:  codemirror
Bilibili-Column-Helper
bilibili专栏助手,已Archive,后续可能port到vscode插件。
Stars: ✭ 26 (-25.71%)
Mutual labels:  codemirror
kirby-markdown-field
Super-sophisticated markdown editor for Kirby 3, community built.
Stars: ✭ 143 (+308.57%)
Mutual labels:  codemirror
rdocsyntax
Syntax highlighting for R HTML documentation
Stars: ✭ 20 (-42.86%)
Mutual labels:  ace-editor
Code-Runner
A portal for programmers to code online
Stars: ✭ 50 (+42.86%)
Mutual labels:  ace
dockside
Dockside is a tool for provisioning lightweight access-controlled IDEs, staging environments and sandboxes - aka 'devtainers' - on local machine, on-premises raw metal or VM, or in the cloud
Stars: ✭ 205 (+485.71%)
Mutual labels:  code-editor
Vue Codemirror Lite
Lightweight Codemirror Component for Vue.js
Stars: ✭ 244 (+597.14%)
Mutual labels:  codemirror
caucus
Realtime Collaborate Editor with Embedded Compiler
Stars: ✭ 278 (+694.29%)
Mutual labels:  codemirror
code-run
一个代码在线编辑预览工具,类似codepen、jsbin、jsfiddle等。
Stars: ✭ 325 (+828.57%)
Mutual labels:  code-editor

Fongshen Editor

A highly customizable code-inserting editor.

About

Fongshen is a code inserting editor, It can integrate and wrap many other text editors and provides multiple buttons sets. Fongshen is based on well known MarkItUp editor but almost rewrite 80% codes.

The name: "Fongshen" in Chinese means the god of wind.

Fongshen's brother is ACE X Markdown Editor in Joomla CMS.

Screen Shot

p-2014-08-11-1

Getting Started

Using ACE

<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" href="src/skins/simple/style.css" />
        <link rel="stylesheet" href="src/type/markdown/style.css" />

        <script src="vendor/jquery/jquery.js"></script>
        <script src="vendor/ace/src-min/ace.js"></script>
        <script src="src/editor/ace-adapter.js"></script>
        <script src="src/fongshen.js"></script>
        <script src="src/type/markdown.js"></script>

        <script>
            jQuery(document).ready(function($)
            {
                var editor = $('#my-editor');

                var options = {
                    id: 'foo',
                    namespace: 'bar',
                    previewAjaxPath: '../parser/markdown.php',
                    previewContainer: '#preview-container',
                    buttons: FongshenMarkdownButtons
                };

                var aceOptions = {
                    lang: 'markdown',
                    wrap: true
                };

                var Fongshen = editor.fongshen(new AceAdapter(aceOptions), options);
            });
        </script>
    </head>
    <body>
        <!-- Editor -->
        <div id="my-editor" class="" style="height: 500px;"></div>

        <!-- Preview -->
        <div id="preview-container"></div>
    </body>
</html>

This will create the simple editor:

p-2014-08-11-2

Using CodeMirror

var editor = $('#my-editor');

var options = {
    id: 'foo',
    namespace: 'bar',
    previewAjaxPath: '../parser/markdown.php',
    previewContainer: '#preview-container',
    resize: false
    buttons: FongshenMarkdownButtons
};

var cmOptions = {
    mode: 'markdown',
    theme: 'elegant',
    lineNumbers: true
};

var Fongshen = editor.fongshen(new CodemirrorAdapter(cmOptions), options);

Dependency Injection

You can create your own editor object and inject it into adapter.

var ace = ace.edit('#my-editor');
var session = ace.getSession();

ace.setTheme("ace/theme/monokai");
session.setMode("ace/mode/markdown");
session.setUseWrapMode(true);

var Fongshen = editor.fongshen(new AceAdapter(ace), options);

Other tutorial please see Examples.

TODO

Add more button set

  • Wiki
  • BBCode
  • reStructuredText

Please comment me if you need other languages.

Add more themes

More documentations, more anything~~~

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].