Metadata-Version: 2.4
Name: XStatic-godo
Version: 0.33.post1+g9ff7505
Summary: godo (XStatic packaging standard)
Author-email: Thomas Jund <tjund@entrouvert.com>
Project-URL: homepage, http://dev.entrouvert.org/project/godo/
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: COPYING
Dynamic: license-file

GODO
a ProseMirror editor for Publik
=======

Godo is based on proseMirror
ProseMirror is distributed via npm.
You need nodeJS & npm

First install node modules since this folder

`npm install`

Debian
------

`apt install rollup npm node-rollup-plugin-buble node-rollup-plugin-node-resolve`


NPM scripts 
-----

`> npm run build`

Get all JS modules and create a big JS file in xstatic folder

`> npm run watch`

automatique build when JS is modified


Use Godo
-----

import in your webpage 

* xstatic/pkg/data/css/godo.css
* xstatic/pkg/datagodo.min.js

Use Godo with a textarea

  <textarea id="textarea-id"></textarea>
  <godo-editor linked-source="textarea-id"></godo-editor>

For more examples, see xstatic/data/index.html

Options
-----

`<godo-editor>` accepts some attributs:

* `schema`: string / Choose schema that activates the possibilities of the editor.
** `basic`: very simple editing: paragraph, bold, italic, link.
** `full`: basic schema with title, sub-title & list.
* `heading_levels`: list / specifies which heading levels are supported. 3 levels max. Default `3, 4` to render `h3` for title and `h4` for sub-title.
* `instant-update`: if present, source is update while typing, otherwise it will be updated before submission of form
* `update-event`: name of JS event / When source trigger indicate event, editor is resetting by parsing source value. Usefull when source as changed.
* `django-syntax`: if present, editor accept django template `{% tag %}` and `{{ var }}`


Example

  <godo-editor
    linked-source="source-id"
    schema="full"
    heading_levels="1,2"
    update-event="wcs:change"
    instant-update
    django-syntax>
  </godo-editor>


License
-------

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
details.

You should have received a copy of the GNU Affero General Public License along
with this program.  If not, see <http://www.gnu.org/licenses/>.
