[MGNLUI-6143] RichTextField: use new chooser dialog retrieval mechanism Created: 19/Aug/20  Updated: 07/Sep/22  Resolved: 01/Mar/22

Status: Closed
Project: Magnolia UI
Component/s: framework
Affects Version/s: 6.2
Fix Version/s: 6.2.18

Type: Improvement Priority: Neutral
Reporter: Federico Grilli Assignee: Jaromir Sarf
Resolution: Done Votes: 2
Labels: nucleus
Remaining Estimate: Not Specified
Time Spent: 0.5d
Original Estimate: Not Specified

Attachments: PNG File image-2022-05-26-00-29-21-559.png    
Issue Links:
Cloners
is cloned by MGNLDAM-1012 DamRichTextField: use new chooser dia... Closed
Git Code Review
opened during git code review in MGNLDAM-869 Rich text field - images from DAM Closed
opened during git code review in MGNLUI-6061 Rich text field - images from DAM Closed
Problem/Incident
causes PAGES-584 pageLink field shows ui-framework-jcr... Closed
Relates
relates to EXTDAM-364 [S3] Performance issue when using Ric... Open
relation
is related to CELUM-21 CKEditor Problem when selecting Celum... Closed
is related to CELUM-22 CKEditor missing magnolia assets in c... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Release notes required:
Yes
Date of First Response:
Sprint: Nucleus 4
Story Points: 3
Team: Nucleus

 Description   

Steps to reproduce

  1. Go to https://nightly.magnolia-cms.com/.magnolia/admincentral#app:pages-app:detail;/travel/contact:edit
  2. Edit the second Text&Image component.
  3. In the rich text field, add a link to
    1. asset
    2. page

Expected results

The same choosers (e.g. same number of columns) as in

  • $damLinkField (I can select asset from any asset provider such as S3 or Bynder)

OR

  • $pageLinkField

are used.

Actual results

The app choosers programatically created from dam/pages app are used internally (deprecated AppAwareWorkbenchChooserDefinition).

 



 Comments   
Comment by Teresa Miyar [ 15/Dec/21 ]

This would be great for when you have external dams or even multiple dams

Comment by Christopher Chard [ 08/Feb/22 ]

Hey guys,
this is highly critical for us. Without, we have a major problem going forward and for our upcoming go-live....

Consider this a +1.000 from Union Investment

Thx & Cheers,

Chris

Comment by Quach Hao Thien [ 01/Mar/22 ]

RN: RichTextField and DamRichTextField use LinkField as Magnolia resource link chooser 

Comment by Christopher Chard [ 26/May/22 ]

Hi tmiyar,

I cannot confirm that this works. On 6.2.18, it now shows an obviously new / modern style of asset picker, but it does not contain our external DAM folder (CELUM) (see attached screenshot).

Might we be doing anything wrong here?

This is our ckeditor config. We are using the vanilla "DamLink" here. Is this correct or do we need to change it?
 

var basePath = window.location.href.replace(/^[a-zA-Z]{3,5}\:\/{2}[a-zA-Z0-9_.:-]+\//, '/').replace(/\.magnolia.*/, '.resources/');

CKEDITOR.plugins.addExternal("magnoliaFileBrowser", CKEDITOR.vaadinDirUrl + "js/filebrowser/");


CKEDITOR.editorConfig = function (config) {

    //Remove unused plugins
    config.removePlugins = 'list,elementspath,filebrowser';

    //Add additional plugins
    config.extraPlugins = 'magnolialink,magnoliaFileBrowser';

    //Toolbar Layout
    var toolbar = [
        {name: "basicstyles", items: ["Bold"]},
        {name: "links", items: ["Link", "InternalLink", "DamLink", "Unlink"]},
        {name: "actions", items: ["SpecialChar", "Superscript"]},
    ];

    config.toolbar = "linking";
    config.toolbar_linking = toolbar;

    //Other configs
    config.disableNativeSpellChecker = true;
    config.enterMode = CKEDITOR.ENTER_P;
    config.shiftEnterMode = CKEDITOR.ENTER_BR;
    config.removeDialogTabs = 'link:advanced';
    config.pasteFromWordRemoveStyles = true;
    config.pasteFromWordRemoveFontStyles = true;
    config.resize_enabled = false;
    config.autoParagraph = false;
};

//Remove HTML Comments when pasting
CKEDITOR.on('instanceReady', function (ev) {
    ev.editor.on('paste', function (evt) {
        var regex = /<\!--.*-->/g;
        var cleaned = evt.data.dataValue.replace(regex, '');
        evt.data.dataValue = cleaned;
    }, null, null, 9);
});

 

 

 

Comment by Christopher Chard [ 26/May/22 ]

FYI: rfalvo

Comment by Teresa Miyar [ 26/May/22 ]

cchard since you have two choosers, I guess we would have to create two dam buttons one for each chooser, need to investigate if we can extend that somehow

Generated at Mon Feb 12 09:33:35 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.