An excellent WYSIWYG editor written in pure TypeScript without the use of additional libraries. Its file editor and image editor.
For old version, please follow here https://github.com/xdan/jodit2
Download latest release or
bower install joditnpm install joditInclude just two files
<linktype="text/css"rel="stylesheet"href="build/jodit.min.css">
<scripttype="text/javascript"src="build/jodit.min.js"></script><linkrel="stylesheet"href="//cdnjs.cloudflare.com/ajax/libs/jodit/3.1.92/jodit.min.css">
<scriptsrc="//cdnjs.cloudflare.com/ajax/libs/jodit/3.1.92/jodit.min.js"></script>And some <textarea> element
<textareaid="editor"name="editor"></textarea>After this, you can init Jodit plugin
vareditor=newJodit('#editor');editor.value='<p>start</p>';With jQuery
$('textarea').each(function(){vareditor=newJodit(this);editor.value='<p>start</p>';});git clone https://github.com/xdan/jodit.git
cd jodit
npm installRun webpack Hot Reload server:
npm startDemo will be available here
http://localhost:2000/
Build min files:
npm run buildRun tests:
karma start --browsers ChromeHeadless,IE,Firefox karma.conf.jsor
npm testor
yarn testFor checking tests in browser, open URL:
http://localhost:2000/test/test.html
For testing FileBrowser and Uploader modules, need install PHP Connector
composer create-project --no-dev jodit/connectorRun test PHP server
php -S localhost:8181 -t ./and set options for Jodit:
vareditor=newJodit('#editor',{uploader: {url: 'http://localhost:8181/index-test.php?action=fileUpload'},filebrowser: {ajax: {url: 'http://localhost:8181/index-test.php'}}});Jodit.plugins.yourplugin=function(editor){editor.events.on('afterInit',function(){editor.seleciotn.insertHTMl('Text');});}vareditor=newJodit('.someselector',{extraButtons: [{name: 'insertDate',iconURL: 'http://xdsoft.net/jodit/logo.png',exec: function(editor){editor.selection.insertHTML((newDate).toDateString());}}]})- Internet Explorer 9
- Latest Chrome
- Latest Firefox
- Latest Safari
- Microsoft Edge
This project is maintained by a community of developers. Contributions are welcome and appreciated. You can find Jodit on GitHub; feel free to start an issue or create a pull requests: https://github.com/xdan/jodit
Licensed under GNU General Public License v2.0 or later
