@107v/grapesjs-image-manager 中文文档教程

发布于 6年前 浏览 24 项目主页 更新于 3年前

GrapesJS image manager

NPM 版本NPM Downloads

Options

  • url Server url, default: null,
  • credentials Always send user credentials (cookies, basic http auth, etc..), default: 'include',
  • beforeSend Processing url before sending, default: null,
  • beforeSetSrc Processing src before displaying image, default: (src) => src,
  • afterChoosingRunOpenAssets Open asset manager, default: false,
  • headers To add headers, default: {},
  • params Query parameters, default: {},
  • queryKey Query parameter key, default: 'path',
  • modalTitle Label modal title, default: 'File Explorer',
  • btnText Label button text, default: 'Explorer images',
  • textEmptyFolder Label text empty folder, default: 'Empty folder',
  • imgLoader image src loader, default: 'data:image/svg+xml,...',
  • imgFolder image src folder, default: 'data:image/svg+xml,...',
  • imgHome image src breadcrum home, default: 'data:image/svg+xml,...',
  • imgReply image src breadcrum reply, default: 'data:image/svg+xml,...',
  • imgChevronRight image src breadcrum previous, default: 'data:image/svg+xml,...',

Download

  • npm i @107v/grapesjs-image-manager

Usage

<link href="path/to/grapes.min.css" rel="stylesheet"/>
<script src="path/to/grapes.min.js"></script>
<script src="path/to/grapesjs-image-manager.min.js"></script>

<div id="gjs"></div>

<script type="text/javascript">
  var editor = grapesjs.init({
      container : '#gjs',
      plugins: ['grapesjs-image-manager'],
      pluginsOpts: {
        'grapesjs-image-manager': {/* ...options */}
      }
  });
</script>

Development

克隆存储库

```sh $ git 克隆 https://github.com/4746/grapesjs-image-manager.git $ cd grapesjs-image-manager

Install it

sh $ npm 我

The plugin relies on GrapesJS via `peerDependencies` so you have to install it manually (without adding it to package.json)

sh $ npm i grapesjs --no-save

Start the dev server

sh $ npm 服务 ```

MIT License

GrapesJS image manager

NPM VersionNPM Downloads

Options

  • url Server url, default: null,
  • credentials Always send user credentials (cookies, basic http auth, etc..), default: 'include',
  • beforeSend Processing url before sending, default: null,
  • beforeSetSrc Processing src before displaying image, default: (src) => src,
  • afterChoosingRunOpenAssets Open asset manager, default: false,
  • headers To add headers, default: {},
  • params Query parameters, default: {},
  • queryKey Query parameter key, default: 'path',
  • modalTitle Label modal title, default: 'File Explorer',
  • btnText Label button text, default: 'Explorer images',
  • textEmptyFolder Label text empty folder, default: 'Empty folder',
  • imgLoader image src loader, default: 'data:image/svg+xml,...',
  • imgFolder image src folder, default: 'data:image/svg+xml,...',
  • imgHome image src breadcrum home, default: 'data:image/svg+xml,...',
  • imgReply image src breadcrum reply, default: 'data:image/svg+xml,...',
  • imgChevronRight image src breadcrum previous, default: 'data:image/svg+xml,...',

Download

  • npm i @107v/grapesjs-image-manager

Usage

<link href="path/to/grapes.min.css" rel="stylesheet"/>
<script src="path/to/grapes.min.js"></script>
<script src="path/to/grapesjs-image-manager.min.js"></script>

<div id="gjs"></div>

<script type="text/javascript">
  var editor = grapesjs.init({
      container : '#gjs',
      plugins: ['grapesjs-image-manager'],
      pluginsOpts: {
        'grapesjs-image-manager': {/* ...options */}
      }
  });
</script>

Development

Clone the repository

```sh $ git clone https://github.com/4746/grapesjs-image-manager.git $ cd grapesjs-image-manager

Install it

sh $ npm i

The plugin relies on GrapesJS via `peerDependencies` so you have to install it manually (without adding it to package.json)

sh $ npm i grapesjs --no-save

Start the dev server

sh $ npm serve ```

MIT License

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文