1.0.3 • Published 4 months ago

axupimgs v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

axupimgs

npm version

👀 中文文档

Feature

  • Tinymce Plugin - Upload multiple images

Description

  • Original author: 莫若卿
  • Tinymce version support: 5.0.4+
  • Supported language: Simplified Chinese
  • Repo Author: Kori

Usage

  • Put this repo folder(axupimgs) in the plugins folder under the TinyMCE home directory

  • Example path: public/js/tinymce/plugins/axupimgs

  • In your component page:

    • many_images_upload_handler is upload logic function
    • blobInfo is file blob
    • succFun is success callback url
    • failFun is error message
 initTinymce() {
      const _this = this
      window.tinymce.init({
        selector: `#tinymceId`,
        plugins: 'axupimgs',
        toolbar: [
          'axupimgs'
        ],
        width: '100%',
        fontsize_formats: '12px 14px 16px 18px 20px 22px 24px 26px 36px 48px 56px',
        statusbar: false,
        // images_upload_handler: (blobInfo) => {
        // },
        // you need define this 'many_images_upload_handler'
        many_images_upload_handler: (blobInfo, succFun, failFun) => {
          // uploadApi is network api
          const res = uploadApi(blobInfo)
          if (res) {
            succFun(res.url)
          } else {
            failFun('fail error')
          }
        },


      })
    },
1.0.3

4 months ago

1.0.22

7 months ago

1.0.21

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

10 months ago