开源软件名称(OpenSource Name):lepture/editor开源软件地址(OpenSource Url):https://github.com/lepture/editor开源编程语言(OpenSource Language):JavaScript 68.0%开源软件介绍(OpenSource Introduction):Editor
SponsorsEditor is sponsored by Typlog. OverviewEditor is not a WYSIWYG editor, it is a plain text markdown editor. Thanks for the great project codemirror, without which editor can never be created. Basic UsageThe easiest way to use Editor is to simply load the script and stylesheet: <link rel="stylesheet" href="http://lab.lepture.com/editor/editor.css" />
<script type="text/javascript" src="http://lab.lepture.com/editor/editor.js"></script>
<script type="text/javascript" src="http://lab.lepture.com/editor/marked.js"></script> You can also use jsdelivr CDN: <link rel="stylesheet" href="//cdn.jsdelivr.net/editor/0.1.0/editor.css">
<script src="//cdn.jsdelivr.net/editor/0.1.0/editor.js"></script>
<script src="//cdn.jsdelivr.net/editor/0.1.0/marked.js"></script> Having done this, an editor instance can be created: var editor = new Editor();
editor.render(); The editor will take the position of the first Get the contentTo get back the edited content you use: editor.codemirror.getValue(); ComponentIf you are using component, you can install it with:
SeajsIf you are using seajs, you can install it with:
DevelopmentYou can build the dist files with
Now you can create the dist files:
You can get everything you need in the ConfigurationThe
Example: new Editor({
element: document.getElementById('editor'),
toolbar: []
}) ContributingContribution is welcome. As a way to keep all code clean, we use Grunt to build our distributed files. Make sure you have read our Contributing Guide. LicenseMIT. Copyright (c) 2013 - 2014 by Hsiaoming Yang |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论