flxlabs/silverstripe-dataobject-links

Adds links to data objects in TinyMCE editor

Maintainers

👁 Valandur

Package info

github.com/flxlabs/silverstripe-dataobject-links

Language:JavaScript

Type:silverstripe-vendormodule

pkg:composer/flxlabs/silverstripe-dataobject-links

Statistics

Installs: 11 226

Dependents: 0

Suggesters: 0

Stars: 6

Open Issues: 21

3.0.0 2025-12-09 17:25 UTC

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

BSD-3-Clause 680ab2da2b75e6bd506234c31abcf48d7978e6f5

  • Marco Crespi <mrc.woop@flxlabs.com>

cmstinymcesilverstripe

This package is auto-updated.

Last update: 2026-06-09 18:28:22 UTC


README

Add links to DataObjects from within the TinyMCE editor

Introduction

Using this module you can link to DataObjects from within TinyMCE.

Requirements

  • Silverstripe CMS ^6
  • silverstripe/htmleditor-tinymce ^1

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;
}