轻巧的Wysiwyg bbcode和XHTML编辑器。
有关更多信息,请访问sceditor.com
包括Sceditor JavaScript:
< link rel =" stylesheet " href =" minified/themes/default.min.css " />
< script src =" minified/sceditor.min.js " > </ script >
< script src =" minified/formats/bbcode.js " > </ script >
< script src =" minified/formats/xhtml.js " > </ script >然后,要将Textarea转换为Sceditor,只需做:
var textarea = document . getElementById ( 'id-of-textarea' ) ;
sceditor . create ( textarea , {
format : 'xhtml' ,
style : 'minified/themes/content/default.min.css'
} ) ;或为BBCode Wysiwyg编辑器做:
var textarea = document . getElementById ( 'id-of-textarea' ) ;
sceditor . create ( textarea , {
format : 'bbcode' ,
style : 'minified/themes/content/default.min.css'
} ) ;最后,要获取编辑器的内容:
var textarea = document . getElementById ( "id-of-textarea" ) ;
sceditor . instance ( textarea ) . val ( ) ; 有关选项的完整列表,请参见选项文档。
您将需要安装Grunt来运行构建/测试。安装grunt运行:
npm install -g grunt-cli接下来,安装Sceditor Dev依赖项运行:
npm install就是这样!您现在可以使用以下命令构建和测试Sceditor:
# Minify the JS and convert the LESS to CSS
grunt build
# Run the linter, unit tests and coverage
grunt test
# Creates the final distributable ZIP file
grunt release您还可以运行开发服务器来测试更改,而无需通过运行来完成完整的构建:
npm run dev然后转到http:// localhost:9000/tests/
欢迎任何贡献和/或拉的请求。
非常感谢主题,翻译,错误报告,错误修复和捐赠。
如果您想捐款,可以通过PayPal或Flattr
Sceditor已获得MIT许可证的许可:
版权(c)2011-2017 Sam Clarke and贡献者 - Sceditor.com
特此免费授予获得此软件副本和相关文档文件副本(“软件”)的任何人,以无限制处理该软件,包括无限制的使用权,复制,复制,修改,合并,合并,发布,分发,分发,分发,订婚,和/或允许软件的副本,并允许对以下条件提供以下条件,以下是以下条件。
上述版权通知和此许可通知应包含在软件的所有副本或大量部分中。
该软件是“原样”提供的,没有任何形式的明示或暗示保证,包括但不限于适销性,特定目的的适用性和非侵权的保证。在任何情况下,作者或版权持有人都不应对任何索赔,损害赔偿或其他责任责任,无论是在合同,侵权的诉讼中还是其他责任,是由软件,使用或与软件中的使用或其他交易有关的。
候选人:完整的蒙蒂表情符号: Oscar Gruno,又名Nominellv。2.0-> [email protected] Andy Fedosjeenko,又名Nightwolf-> [email protected]
图标作者: Mark James(http://www.famfamfam.com/lab/icons/silk/)获得了Creative Commons CC-By许可证的许可。