When we create a smartdocs model and enter a description we would like to be able to enter HTML in the description field but when you click create the Global: Text Field is set to Plain Text. Is there any way to change that default?
I tried changing the /admin/config/content/formats weights and permissions but nothing seemed to work.
I'm going to make some assumptions about the fields you mean, but these steps may work for you.
You're adding a smartdocs model by going to the menu item "Content -> SmartDocs" and then clicking the "New model" link, which takes you to this form:
After importing an OpenAPI spec, the resulting page will look like:
Then edit the view by clicking the gear icon, then click on the global: text area
In the modal window that appears
Then save, and the view will now display as:
So that is my exact problem and that is how I am currently solving it but I would like it to default to full HTML (not have to make that change every time). The reason that I want that to default to Full HTML is because I am using smartdocs_service to upload the smartdocs programatically.
The views for each model are cloned from a base view called "Smartdocs Method Listing". If you edit that once, all future clones views should have that change as well.
If you're comfortable writing custom code, I think you could do this with a hook_views_pre_render() call instead.
Editing the Smartdocs Method Listings view did not seem to work. That view does not have a header Global: Text View. I tried adding one but it didn't seem to do anything.
arg, you're right, strike 2!
Looks like that text header is added via code in smartdocs_create_model_view(). I think the only way to modify this would be to implement a hook_views_view_presave() unfortunately.
Presuming this is a Drupal-based Edge (local) implementation, as I'm using Edge on Google Cloud and cannot modify the SmartDocs rendering at all.
User | Count |
---|---|
5 | |
2 | |
2 | |
1 | |
1 |