0

The Wagtail example of using entities as given in this page of documentation isn't working for me. I am following the third example of using Entities which is supposed to create a button for stock price but no button is appearing for me in the rich text field in the admin editor. I have created a minimum reproducible example which demonstrates just this problem. https://github.com/kiwiheretic/stockentity. I am using Wagtail 4.1.1 which I understand is the latest version.

Can anyone help me see what I have missed and why the button doesn't appear as expected?

Kiwiheretic
  • 308
  • 2
  • 12

1 Answers1

0

This or a similar question was asked in the Wagtail Slack. To get the button to appear, it either needs to be included in the features list when you create a new RichTextField OR you need to add it to the default configuration using the WAGTAILADMIN_RICH_TEXT_EDITORS setting.

cnk
  • 981
  • 1
  • 5
  • 9
  • I already did that. DId you check the github repo? You can see it in https://github.com/kiwiheretic/stockentity/blob/main/home/models.py – Kiwiheretic Dec 04 '22 at 23:20
  • OK I see the python portions of the example code - but your stock.js is empty. Does the example work if you copy the react code from the example into https://github.com/kiwiheretic/stockentity/tree/main/home/static/js – cnk Dec 05 '22 at 00:18
  • Its not empty for me. I had a look at https://github.com/kiwiheretic/stockentity/blob/main/home/static/js/stock.js and it contains 22 lines of code. – Kiwiheretic Dec 05 '22 at 02:55