Problem/Motivation
The text format "plain text" is visible on the text format list now.
This seems to be caused by the `processTextFormat` method of the "WebformHtmlEditor.php" file as it's not removing the fallback format from the "#allowed_formats" array when there are other available formats and causing the format to not be removed.

The code below is how Drupal core handling the fallback format.

Steps to reproduce
1. Install webform version greater than 6.2.0 beta4
2. Go to node create page.

Proposed resolution
The format should only be visible when there is no other available formats
Comments
Comment #2
sker101 commentedComment #3
hershey.k commentedComment #4
hershey.k commentedComment #5
jrockowitz commentedComment #7
jrockowitz commentedComment #8
jrockowitz commentedMarking this as RTBC since it must go out in the next beta release.
Comment #9
hershey.k commented@jrockowitz - I tested the patch on a personal project and I'm not seeing the issue resolved on my end with the patch applied.
Here's a simplytest.me spun up with Core: 9.5.3 and Webform: 2.x-dev with the patch applied and the Plain Text format is still appearing. Am I missing some step?
Comment #10
jrockowitz commentedOkay, I can see it on simplytest.me. I also uninstalled webform and the webform's text format did not get uninstalled.
Comment #11
hershey.k commentedI modified the patch logic to use `array_key_exists` in-place of `isset()` for checking whether the array index exists. Because it was returning FALSE due to the key being set to `null`. See below.
With this change the patch functions as expected. MR has the modified code.
Comment #13
hershey.k commentedHere's simplytest site with updated patch applied and functioning.
Comment #14
jrockowitz commentedThank you for reviewing the patch. Here is a lighter-weight approach to blocking the default webform text format from being exposed on other forms.
Comment #16
hershey.k commentedI tested patch in #14 and it functions as expected both on a personal project and on simplytest.me.
Comment #18
jrockowitz commented