Personality Tool for CodeX Editor
This tool allows you to create Personality block in your articles.
Install via npm
npm i --save codex.editor.personality
Connect with Webpack
Include module in your application
var cdxEditorPersonality = ;
Include CSS filee
;
You will need exports-loader
, css-loader
and file-loader
.
Install directly
- Download folder
- Add
personality.js
andpersonality.css
files on your page
Usage
Pass new tool to the codex.editor.start
method in tools
array:
personality: type : 'personality' displayInToolbox : true iconClassname : 'cdx-personality-icon' prepare : cdxEditorPersonalityprepare render : cdxEditorPersonalityrender save : cdxEditorPersonalitysave validate : cdxEditorPersonalityvalidate destroy : cdxEditorPersonalitydestroy enableLineBreaks : true showInlineToolbar: true config: uploadURL: '/uploadPhoto'
- Specify
config.uploadURL
with route for file uploading.
File uploading
To set personality photo, you will need server-side image uploader method.
Tool will send selected file on the route passed with config.uploadURL
. Then you free to implement your own file-saving scheme.
Expected server response format:
CodeX Editor
API oriented, open-source, block-styled Edtior.
https://github.com/codex-team/codex.editor
Authors
We are small team of Web-developing fans consisting of IFMO students and graduates located in St. Petersburg, Russia. Fell free to give us a feedback on team@ifmo.su
Follow us!
Telegram: https://t.me/codex_team
Instagram: https://www.instagram.com/codex_team