flxlabs / silverstripe-dataobject-links
Adds links to data objects in TinyMCE editor
Installs: 8 796
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 2
Forks: 6
Open Issues: 20
Language:JavaScript
Type:silverstripe-vendormodule
Requires
- dev-master
- 2.0.2
- 2.0.1
- 2.0.0
- 1.1.0
- 1.0.2
- 1.0.1
- 1.0.0
- dev-develop
- dev-dependabot/npm_and_yarn/json5-and-silverstripe/webpack-config-1.0.2
- dev-dependabot/npm_and_yarn/json5-and-babel-loader-and-silverstripe/eslint-config-and-silverstripe/webpack-config-and-webpack-and-webpack-cli-2.2.3
- dev-dependabot/npm_and_yarn/qs-6.5.3
- dev-dependabot/npm_and_yarn/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/terser-4.8.1
- dev-dependabot/npm_and_yarn/async-2.6.4
- dev-dependabot/npm_and_yarn/lodash-es-4.17.21
- dev-dependabot/npm_and_yarn/path-parse-1.0.7
- dev-dependabot/npm_and_yarn/hosted-git-info-2.8.9
- dev-dependabot/npm_and_yarn/lodash-4.17.21
- dev-dependabot/npm_and_yarn/ssri-6.0.2
- dev-dependabot/npm_and_yarn/y18n-3.2.2
- dev-dependabot/npm_and_yarn/elliptic-6.5.4
- dev-dependabot/npm_and_yarn/ini-1.3.7
- dev-dependabot/npm_and_yarn/node-sass-4.14.1
- dev-dependabot/npm_and_yarn/npm-6.14.6
- dev-dependabot/npm_and_yarn/jquery-3.5.0
This package is auto-updated.
Last update: 2025-02-16 09:00:42 UTC
README
Add links to DataObjects from within the TinyMCE editor
Introduction
Using this module you can link to DataObjects from within TinyMCE.
Setup
You can either add this module to your composer file using
composer require flxlabs/silverstripe-dataobject-links
or download the git repository and add a folder called dataobject-links
to the top level
of your project and drop the code in there.
Configure
In your settings .yml
file put a section with
FLxLabs\DataObjectLink\DataObjectLinkModalExtension: classes: Team: name: Team Player: Player name: Player sort: Title
Where classes
is a map from ClassName to display name that is used when selecting the DataObject.
Make sure to run /dev/build?flush
to load in your config changes.
Usage
In TinyMCE's Insert link
menu there will be a new entry Link to an Object
at the very top. Use that to link to an Object of one of the classes that is listed in your config.
When generating the link this module will call the Link
method on a DataObject. Override it to provide a link to your DataObject.
// This code doesn't actually work, it's just an example public function Link() { return DataObject::get()->first()->Link() . $this->ID; }