Skip to content

[UI Library] | Unable to modify format options in FieldRichText.vue (one line rich text field) #12134

@NateWr

Description

@NateWr

Valid Title

  • I have updated the title to accurately reflect the bug description

Description

It's not possible to modify the format options in the one line rich text field. I am using the field in a plugin where users will want to be able to use links in the field.

The toolbar option in FieldRichText.php is used to add the format dropdown button. I can override this, but I can't add options to the existing formatting dropdown, which makes good use of tight space in the field.

(PR incoming)

Steps to Reproduce

  1. In stable-3_5_0, install and enable the openScienceBadges plugin (work in progress).
  2. Navigate to a submission's metadata form.
  3. Click into the field for "Open Data".
  4. See that the formatting button is gone and all toolbar options are there instead.

You can see the code that adds this field.

Expected Result

Passing a toolbar argument to new FieldRichText(...) should modify the formatting button dropdown.

Actual Result

Passing a toolbar argument overrides the formatting button.

Environment Details

No response

Application Version

OJS 3.5

Logs

No response

Additional Information

No response

Metadata

Metadata

Labels

Enhancement:1:MinorA new feature or improvement that can be implemented in less than 3 days.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions