Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ This controller is an instance of the [SayController](https://github.com/lblod/e
These are functions available from the editor element, which is the HTML element with the class `notule-editor`.

- `async initEditor(arrayOfPluginNames: string[], configurationOptions)`: Initialize the editor by passing an array of plugin names that should be activated and an object that contains the configuration for the editor and its plugins. See [Managing Plugins](managing-plugins) for more info.
:warning: **`initEditor` has to be called before accessing any other methods**.

> [!WARNING] `initEditor` has to be called before accessing any other methods. If you used the `renderEditor` function, the `initEditor` is already called for you.
- `enableEnvironmentBanner()`: enable the banner that shows the environment and versions of plugins used.
- `disableEnvironmentBanner()`: disable the banner.
- `controller`: provides direct access to a [SayController](https://github.com/lblod/ember-rdfa-editor/blob/master/packages/ember-rdfa-editor/src/core/say-controller.ts) object. See [controller API](#controller-api).
Expand Down
3 changes: 1 addition & 2 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ way the editor is configured, and [deserve their own page](/docs/plugins.md)
There are some options you can pass to `options` in `renderEditor` that are not connected to a plugin.

- `docContent: 'block+'`: The property docContent specifies which nodes are allowed in the document. By default we allow one or more nodes of the group block, which includes most content. A group can be seen as a supertype that includes multiple types. For more info about this check the [Prosemirror docs](https://prosemirror.net/docs/guide/#schema.content_expressions).
See `public/test.html` where `docContent` is specified to allow a [table of contents](/docs/plugins/table-of-contents-plugin.md) and [article-structure](/docs/plugins/article-structure-plugin.md) nodes in a specific order.
- `ui: { expandInsertMenu: false }`: Whether to automatically open the "insert" sidebar menu upon load.
See `embeddable-say-editor/test-app/shared-config.ts` where `docContent` is specified to allow a [table of contents](/docs/plugins/table-of-contents-plugin.md) node.
- `table: { inlineBorderStyle: { width: '1px', style: 'solid', color: '#000' }`: Styles to be applied to table borders in the editor and when exporting HTML (e.g. by copying to the clipboard). If not specified, a thin border is shown in the editor but not exported.
- `table: { rowBackgrounds: { even: 'white', odd: 'whitesmoke' } }`: Configuration of row background colors. Allows for specifying alternating row colors. Rows use 1-based indexing.
- `image: { allowBase64Images: true}`: Will enable the pasting of base64 images embedded into the document, also enables a plugin to check if the paste size is too big. By default the paste limit will be 1MB and will throw an error to the console if surpassed.
Expand Down
2 changes: 1 addition & 1 deletion embeddable-say-editor/app/plugins/definitions/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { mergeConfigs } from '../setup/defaults';
export type TableConfig = {
tableGroup: string;
cellContent: string;
inlineBorderStyle: { width: string; color: string };
inlineBorderStyle: { width: string; style?: string; color: string };
rowBackground?: { even?: string; odd?: string };
};

Expand Down