[Question]
Is there any way to edit the default wsiwyg editor on a content component. We are looking to limit the formatting available to the user for example, to only allow bold and one heading option.
As clarification we are trying to modify it in the form builder, not the final render result.
@Bdestasio33,
Yes, it is also possible to provide your own custom configurations to the WYSIWYG editor found @ https://quilljs.com/docs/configuration. These configurations can be provided instead of the “true” value of the wysiwyg attribute.
Would you be able to provide some direction on where exactly this quill configuration goes when you are setting up the <FormBuilder> element? I see how to configure the WYSIWYG editor for the user filling out the form, but it's not clear to me how you configure the WYSIWYG editor for the user building the form.
@wag110894 If I edit the Content.form.js file directly, I can get this to work. Is there any way to configure this without editing the formio source code directly?
Sounds like what you really want to do is modify the builder so that the options for wysiwyg can be customized. There is a way to do that at http://formio.github.io/formio.js/app/examples/custombuilder.html
I don't have a specific example of how to customize the wysiwyg on content components but you should be able to override anything there. In react, you can pass the "options" prop to the FormBuilder component.
Thanks, @randallknutson. We've tried that and maybe we're just not lining up the keys / nesting correctly, but it doesn't seem to work on the component with key "html". Sandbox to show you what I'm trying is 5edf7b947630ae81732383c7. The other options specified in that set work just fine, and if I apply those options directly to Content.form.js, it works. But I can't seem to get it to work when passing as options.
It does look like the html component is hard coded outside of the normal "extend" functionality for the edit form which is why it isn't working. https://github.com/formio/formio.js/blob/master/src/components/content/Content.form.js#L25-L38
I'm not sure if there is a good way of extending that using the default system.
Bummer, that's kind of the conclusion we were coming to. Thanks for looking into that for us. We'll probably just have to roll our own component.
I am closing the issue as it was created too long ago and there are no new comments here. I hope it was resolved. If not, please reopen it. Thanks!