- Notifications
You must be signed in to change notification settings - Fork9
doabit/baidu_ueditor_rails
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
baidu ueditor for rails, precompile codes fromtinymce-rails
Add this line to your application's Gemfile:
gem 'baidu_ueditor_rails5', github: 'doabit/baidu_ueditor_rails'
And then execute:
$ bundle
Usage:
rails g baidu_ueditor_rails:install
Then add codes in application.js
//=requirebaidu_ueditor//=requireueditor_custom_config
configroutes.rb
mountBaiduUeditorRails::Engine=>"/ueditor"
In ueditor_custom_config.js, it looks like:
//ueditorcustomconfig(function(){window.CUSTOM_CONFIG={//Insertyourconfigcode // toolbars: [ //['Source','Undo','Redo','Cleardoc','SearchReplace','InsertImage','WordImage','Bold','ForeColor','JustifyLeft',//'JustifyCenter','JustifyRight','JustifyJustify','RemoveFormat','FormatMatch','AutoTypeSet','PastePlain',//'FontSize','Preview','Link','FullScreen','PageBreak','InsertTable','Attachment','InsertVideo'] // ], serverUrl: '/ueditor', imageManagerUrlPrefix: ''};jQuery.extend(window.UEDITOR_CONFIG,window.CUSTOM_CONFIG);})();
you can write your custom config in
window.CUSTOM_CONFIG={//.........};
<scripttype="text/javascript"> var editor = new UE.ui.Editor(); editor.render("your_textarea_id");</script>
- Add upload image and file.
- Add form helpers.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
About
Baidu ueditor for rails
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.