The wagtail example of using entities isn't working for me - wagtail

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?

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.

Related

How can I use the RichText editor draftail in Wagtail?

This is a very generic question so I don't have any code to show for it yet however I am wondering if anyone can give me a minimal example or guidance on how to use the draftail editor in Wagtail, but not in the admin, but on a public facing page. I haven't managed to find any information on that in the Wagtail documentation, just pages on RichText internals about how to customise the editor in the admin.

React-admin tinymce - how to get content?

I'm an experienced Javascript developer, but new to React, so I'm looking for a bit of help.
This sandbox demonstrates the issue:
https://codesandbox.io/s/distracted-banzai-i46eg?fontsize=14&hidenavigation=1&theme=dark
If you edit one of the posts, (and dismiss the TinyMCE license alert), you'll see the original content and can edit it.
When you edit the text,the new content is passed to the handleEditorChange() function in posts.js, from the custom rich edit component. (Sometimes you to tab out of the rich text for this to happen, which I'm not worried about).
However, if you save the change, the original text is POSTed to the dataprovider (as per your developer tools network tab), which implies the form record is not being updated.
How do I get the form record set to the new value from the editor?
Any help is much appreciated!
Regards,
Andy

How Embed Gist in Wagtail?

How to insert dynamic gist code in the middle of posts generated by Wagtail (Django Cms)?
I searched the documentation of wagtail but did not find anything that could help me automatically insert the github codes.
Gist is one of the built in content types supported by Wagtail's embedded content feature. Within a rich text field, editors can use the 'media' toolbar icon to enter the URL to the Gist page, and it will appear embedded in the rich text content. Within a StreamField, the developer can EmbedBlock to the set of available block types, and the editor will then be able to enter the Gist URL into that field.

Using intermediate appPage xpages mobile

I have a simple issue, but I don´t how to solve the problem.
Using XPages Mobile controls, I have a document with some actions, and one of them is "Send to Signature".
The workflow is: select the signer of document (from names) and send to signature.
I need to show for the current user, one field to select the signer (I already have a field with typeahead funcion to select him).
I would like to use an intermediate appPage for this, but when I´m in the new appPage, the currentDocument is gone.
How can I use the same document (opening from a dataView) for solve this problem?
Can I navigate between appPages (inside SinglePageApp) using the currentDocument??
Thanks in advance
It might be worth looking at Mobile Value Picker on OpenNTF. The mobile prefix may need setting in XSP Properties to "Mobile_" (or it could be that I messed around with the development version after the last upload). But it gives code to have a button / link to go to a subsequent appPage to select values from a list. It starts from a DataView, to a document, to the selection page.
The project has not changed for a couple of years, but I've just tested it in Chrome setting user agent to Android and it still seems to work fine on 9.0.1 FP2.

Drupal 7: Add duplicates for form fields on the fly

I've got a form that's being generated using the Form API. There is a fieldset that contains several text fields. What I need to do is have a link or button that a user clicks if they want to add a duplicate of that fieldset to the form so they can add another set of similar information to the form. This is to essentially allow them to add multiple records without having to add each record individually. Is there a good way to go about adding this kind of functionality using the Forms API in Drupal 7?
There's a good example of this in the examples module package:
http://api.drupal.org/api/examples/ajax_example%21ajax_example_graceful_degradation.inc/function/ajax_example_add_more/7
It's a little complex, but that is very well documented, so you should be able to follow along.
You'll want to look at the entire ajax_example module (part of http://drupal.org/project/examples) for the relevant menu callbacks as well.

Resources