grapesjs-plugin-forms

WebJar for grapesjs-plugin-forms

Лицензия

Лицензия

BSD 3-Clause
Категории

Категории

JavaScript Языки программирования ORM Данные
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

grapesjs-plugin-forms
Последняя версия

Последняя версия

1.0.5
Дата

Дата

Тип

Тип

jar
Описание

Описание

grapesjs-plugin-forms
WebJar for grapesjs-plugin-forms
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/artf/grapesjs-plugin-forms

Скачать grapesjs-plugin-forms

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/grapesjs-plugin-forms/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>grapesjs-plugin-forms</artifactId>
    <version>1.0.5</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/grapesjs-plugin-forms/
implementation 'org.webjars.npm:grapesjs-plugin-forms:1.0.5'
// https://jarcasting.com/artifacts/org.webjars.npm/grapesjs-plugin-forms/
implementation ("org.webjars.npm:grapesjs-plugin-forms:1.0.5")
'org.webjars.npm:grapesjs-plugin-forms:jar:1.0.5'
<dependency org="org.webjars.npm" name="grapesjs-plugin-forms" rev="1.0.5">
  <artifact name="grapesjs-plugin-forms" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='grapesjs-plugin-forms', version='1.0.5')
)
libraryDependencies += "org.webjars.npm" % "grapesjs-plugin-forms" % "1.0.5"
[org.webjars.npm/grapesjs-plugin-forms "1.0.5"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

GrapesJS Forms

This plugin adds some basic form components and blocks to help working with forms easier

Demo

New components: form input textarea select checkbox radio button label

Options

  • blocks Which blocks to add, default: ['form', 'input', 'textarea', 'select', 'button', 'label', 'checkbox', 'radio'] (all),
  • labelTraitMethod Method trait label, default: 'Method',
  • labelTraitAction Action trait label, default: 'Action',
  • labelTraitState State trait label, default: 'State',
  • labelTraitId ID trait label, default: 'ID',
  • labelTraitFor For trait label, default: 'For',
  • labelInputName Input name label, default: 'Input',
  • labelTextareaName Textarea name label, default: 'Textarea',
  • labelSelectName Select name label, default: 'Select',
  • labelCheckboxName Checkbox name label, default: 'Checkbox',
  • labelRadioName Radio name label, default: 'Radio',
  • labelButtonName Button name label, default: 'Button',
  • labelTraitName Name trait label, default: 'Name',
  • labelTraitPlaceholder Placeholder trait label, default: 'Placeholder',
  • labelTraitValue Value trait label, default: 'Value',
  • labelTraitRequired Required trait label, default: 'Required',
  • labelTraitType Type trait label, default: 'Type',
  • labelTraitOptions Options trait label, default: 'Options',
  • labelTraitChecked Checked trait label, default: 'Checked',
  • labelTypeText Text type label, default: 'Text',
  • labelTypeEmail Email type label, default: 'Email',
  • labelTypePassword Password type label, default: 'Password',
  • labelTypeNumber Number type label, default: 'Number',
  • labelTypeSubmit Submit type label, default: 'Submit',
  • labelTypeReset Reset type label, default: 'Reset',
  • labelTypeButton Button type label, default: 'Button',
  • labelNameLabel Label type label, default: 'Label',
  • labelForm Form type label, default: 'Form',
  • labelSelectOption Select option type label, default: '- Select option -',
  • labelOption Option label, default: 'Option'
  • category Category label, default: 'Forms'

Download

  • CDN
    • https://unpkg.com/grapesjs-plugin-forms
  • NPM
    • npm i grapesjs-plugin-forms
  • GIT
    • git clone https://github.com/artf/grapesjs-plugin-forms.git

Usage

Directly in the browser

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

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

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

Modern javascript

import grapesjs from 'grapesjs';
import gjsForms from 'grapesjs-plugin-forms';

const editor = grapesjs.init({
  container : '#gjs',
  // ...
  plugins: [gjsForms],
  pluginsOpts: {
    [gjsForms]: { /* options */ }
  }
  // or
  plugins: [
    editor => gjsForms(editor, { /* options */ }),
  ],
});

Development

Clone the repository

$ git clone https://github.com/artf/grapesjs-plugin-forms.git
$ cd grapesjs-plugin-forms

Install it

$ npm i

Start the dev server

$ npm start

License

BSD 3-Clause

Версии библиотеки

Версия
1.0.5
1.0.1
0.3.6