Ueditor Editor, custom image upload

Source: Internet
Author: User

  1. <div>
  2. <H1> Full demo</H1>
  3. <form method="POST" name="form">
  4. <div id="editor" name="content" style="width:800px;height:500px"> </div>
  5. <div id="Editor2" name="content" style="width:800px;height:500px"> </div>
  6. </form>
  7. </div>
  8. <div><input type="button" value="Commit" onclick="t ()"> </input></div>
  9. Iii. creating an instance of the UE object
  10. <script type="Text/javascript">
  11. Instantiation Editor
  12. We recommend that you use the factory method Geteditor to create and reference the editor instance, and if you refer to the editor under a closure, call Ue.geteditor (' editor ') directly to get the relevant instance
  13. var ue = ue.geteditor (' editor ', {
  14. Toolbars: [
  15. [' Source ', ' subscript ', ' superscript ', ' undo ', ' Redo ', ' bold ', ' Snapscreen ', ' Preview ', ' simpleupload ', ' insertimage ', ' Emotion ',
  16. ' Spechars ', ' Drafts ', ' time ', ' date '
  17. ],
  18. Autoheightenabled:true,
  19. Autofloatenabled:true,
  20. Imageactionname: ' testupload '//define the action name of the upload
  21. });
  22. UE. Editor.prototype._bkgetactionurl = UE.  EDITOR.PROTOTYPE.GETACTIONURL;
  23. UE. EDITOR.PROTOTYPE.GETACTIONURL = Function (action) {
  24. if (action = = ' Testupload ') {//Jump to later upload action
  25. Return ' ${pagecontext.request.contextpath}/testeditor/testupload.action ';
  26. } else {
  27. Return This._bkgetactionurl.call (this, action);
  28. }
  29. }
  30. function T () {
  31. form.action="${pagecontext.request.contextpath}/testeditor/testform.action";
  32. Form.submit ();
  33. }
  34. </Script>

Ueditor Editor, custom image upload

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.