@H_404_2@我跟着Summernote-rails
官方在我的rails项目中添加富文本编辑器. @H_404_2@而不是我的edit.html.erb
将class place_editor添加到我的text_area中
请帮助我.
官方在我的rails项目中添加富文本编辑器. @H_404_2@而不是我的edit.html.erb
将class place_editor添加到我的text_area中
<%= f.text_area :text,class: "place_editor form-control col-md-7 col-xs-12",rows: "15j,placeholder: "Text",required: "required"%>@H_404_2@和javascript一样
<script type="text/javascript"> $(function() { $('.place_editor').summernote(); var edit = function () { $('.click2edit').summernote({ focus: true }); }; $("#edit").click(function () { $('.click2edit').summernote({ focus: true }); }); $("#save").click(function () { var aHTML = $('.click2edit').code(); //save HTML If you need(aHTML: array). $('.click2edit').destroy(); }); // Adding Css to give border to text editor $(".note-editor").css("border","solid 1px #e7eaec"); }); </script>@H_404_2@一切都很好,除了图标
请帮助我.