2017 © Pedro Peláez
 

typo3-cms-extension rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem

image

netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem

  • Thursday, March 22, 2018
  • by copitz
  • Repository
  • 10 Watchers
  • 23 Stars
  • 8,215 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 11 Open issues
  • 5 Versions
  • 40 % Grown

The README.md

License PHPStan PHPCodeSniffer CodeQL, (*1)

Total downloads TYPO3 extension Stability TYPO3 versions Verified state Latest version , (*2)

Image support for CKEditor for TYPO3

This extension adds the TYPO3 image browser to CKEditor.\ Add issues or explore the project on GitHub., (*3)

, (*4)

  • Same image handling as rtehtmlarea (magic images, usual RTE TSConfig supported)
  • Image browser as usual in e.g. FAL file selector
  • Dialog for changing width, height, alt and title (aspect ratio automatically maintained)

Installation

  1. Install the extension, (*5)

    1. with composer from packagist, (*6)

      composer req netresearch/rte-ckeditor-image
      
  2. Add a preset for rte_ckeditor or override the default one (as below):, (*7)

    <?php
    // EXT:my_ext/ext_localconf.php`
    $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['default'] = 'EXT:my_ext/Configuration/RTE/Default.yaml';
    
    # EXT:my_ext/Configuration/RTE/Default.yaml
    imports:
      # Import default RTE config (for example)
      - { resource: "EXT:rte_ckeditor/Configuration/RTE/Default.yaml" }
      # Import the image plugin configuration
      - { resource: "EXT:rte_ckeditor_image/Configuration/RTE/Plugin.yaml" }
    
    editor:
      config:
        # RTE default config removes image plugin - restore it:
        removePlugins: null
        toolbar:
          items:
            - '|'
            - insertImage
    
  3. Enable RTE config preset (e.g. default), (*8)

    # Page TSConfig
    RTE.default.preset = default
    
  4. Include extension Static Template file, (*9)

    1. go to Template » Info/Modify » Edit whole template record » Includes
    2. choose CKEditor Image Support for Include static (from extensions) before the Fluid Styled content

Configuration

(optional) Configure the Extension Configuration for this extension:, (*10)

fetchExternalImages: By default, if an img source is an external URL, this image will be fetched and uploaded to the current BE users uploads folder. The default behaviour can be turned off with this option., (*11)

Maximum width/height

The maximum dimensions relate to the configuration for magic images which have to be set in Page TSConfig:, (*12)

# Page TSConfig
RTE.default.buttons.image.options.magic {
    # Default: 300
    maxWidth = 1020
    # Default: 1000
    maxHeight = 800
}

Current versions of TYPO3 won't render TSConfig settings correctly out of custom template extensions (see the corresponding T3 bug: https://forge.typo3.org/issues/87068). In this case just add the settings to root page config., (*13)

Usage as lightbox with fluid_styled_content

# Template Constants
styles.content.textmedia.linkWrap.lightboxEnabled = 1

Configure a default css class for every image

# TS Setup

lib.parseFunc_RTE {
    // default class for images in bodytext:
    nonTypoTagStdWrap.HTMLparser.tags.img.fixAttrib.class {
      default = my-custom-class
    }
}

Image lazyload support

The extension supports TYPO3 lazyload handling (fluid_styled_content) for native browser lazyload., (*14)

# Template Constants type=options[lazy,eager,auto]
styles.content.image.lazyLoading = lazy

Allowed extensions

By default, the extensions from $TYPO3_CONF_VARS['GFX']['imagefile_ext'] are allowed. However, you can override this for CKEditor by adding the following to your YAML configuration:, (*15)

editor:
  externalPlugins:
      typo3image:
        allowedExtensions: "jpg,jpeg,png"

Deployment

  • developed on GitHub
  • composer repository
  • new version will automatically be uploaded to TER via Github Action when creating a new Github release

The Versions

22/03 2018

dev-master

9999999-dev https://www.netresearch.de

Image support in CKEditor for the TYPO3 ecosystem

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

17/08 2017

v8.7.4

8.7.4.0 https://www.netresearch.de

Image support in CKEditor for the TYPO3 ecosystem

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

26/06 2017

v8.7.3

8.7.3.0 https://www.netresearch.de

Image support in CKEditor for the TYPO3 ecosystem

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

23/06 2017

v8.7.2

8.7.2.0 https://www.netresearch.de

Image support in CKEditor for the TYPO3 ecosystem

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

17/05 2017

v8.7.1

8.7.1.0 https://www.netresearch.de

Image support in CKEditor for the TYPO3 ecosystem

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires