@novaprose/tinymce-compat 0.5.3 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -56,15 +56,20 @@ editor.on('change', () => console.log(editor.getContent()));
56
56
  `onClose`, `onTabChange`; `api.getData/setData/close/block/unblock/focus/disable/enable/showTab`.
57
57
  - **`editor.dom`** (reading): `select`, `get`, `getParent(s)`, `is`, `getAttrib`, `hasClass`, `encode`,
58
58
  `decode`, `create`, `uniqueId`. **`editor.formatter`**: `apply`/`remove`/`toggle`/`match` for built-in
59
- formats (`bold`…`h1`…`alignleft`…, `forecolor`, `hilitecolor`, `fontname`, `fontsize`).
59
+ formats (`bold`…`h1`…`alignleft`…, `forecolor`, `hilitecolor`, `fontname`, `fontsize`) and your own
60
+ (`formats` option, `formatter.register`). **`editor.selection`**: `getContent`, `setContent`, `getNode`,
61
+ `isCollapsed`, `collapse`, `setCursorLocation`, `select`.
60
62
  - **`editor.ui.registry`**: `addButton`, `addToggleButton` (with `onSetup` and `api.setActive`),
61
63
  `addMenuButton` (`fetch`), `addMenuItem`, `addContextToolbar`, `addIcon`; TinyMCE icon names map to
62
64
  NovaProse icons.
63
65
  - **Events**: `init`, `input`, `change` (on blur after edits), `NodeChange`, `focus`, `blur`,
64
66
  `keydown`, `keyup`, `click`, `paste`, `SetContent`, `GetContent`, `SaveContent`, `ExecCommand`,
65
67
  `Dirty`, `remove`.
66
- - **Options**: `toolbar`, `menubar`, `plugins`, `statusbar`, `placeholder`, `readonly`, `language`,
67
- `inline`, `height`/`min_height`/`max_height`/`width`, `content_style`, `images_upload_handler`,
68
+ - **Options**: `toolbar`, `menubar`, `plugins`, `statusbar`, `placeholder`, `readonly`, `disabled`
69
+ (also `editor.options.set('disabled', …)`), `resize`, `block_formats`, `file_picker_callback`, `file_picker_types`, `formats`, `style_formats`,
70
+ `style_formats_merge`, `valid_classes`, `table_class_list`, `table_cell_class_list` (without it all classes are kept, as in TinyMCE), `language`,
71
+ `inline`, `height`/`min_height`/`max_height`/`width`, `content_style`, `content_css` (your files; skin names
72
+ like `default` or `dark` are ignored), `images_upload_handler`,
68
73
  `paste_as_text`, `paste_preprocess`, `valid_elements`/`invalid_elements`/`valid_styles`,
69
74
  `font_family_formats`, `font_size_formats`, `line_height_formats`, `color_map`, `toolbar_mode`,
70
75
  `setup`, `init_instance_callback`, `autosave_*`, `quickbars_*`, `mentions_fetch`.
@@ -75,5 +80,5 @@ nothing; optional ones (`charmap`, `emoticons`, `anchor`, `media`, `autosave`…
75
80
  Unknown options and plugins don't break initialization — they are listed in a console warning.
76
81
 
77
82
  Not yet: direct DOM edits through `editor.dom` (NovaProse redraws the text from its document model —
78
- use `setContent`, `insertContent` or `editor.formatter`), custom formats (`formatter.register`),
79
- `addContextForm`, iframe content (`content_css`). See [the migration guide](https://novaprose.com/guides/migrating-from-tinymce/).
83
+ use `setContent`, `insertContent` or `editor.formatter`), `addContextForm`; format features beyond
84
+ `block`/`inline`/`selector` + `classes`/`styles` (`wrapper`, `attributes`, `%value` variables, `div` blocks). See [the migration guide](https://novaprose.com/guides/migrating-from-tinymce/).