Closed (fixed)
Project:
Webform
Version:
8.x-5.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Oct 2017 at 09:52 UTC
Updated:
9 Nov 2017 at 14:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jrockowitz commentedIt is going to become very difficult to manage custom text formats for different HTML editor instances.
I recommend we try making it easy to use a form alter hook the tweak any HTML editor to use any specified text format.
When trying to use a form alter hook on the 'webform_handler_form', I ran into some minor issues like missing metadata and bug in the HTML editor's handling of the #format property.
The attached patch fixes these issues and allows the below code to force the Email's HTML editor to use the 'plain_text' format.
BTW, I am willing to say this is now a 'Normal' priority ticket, especially because there are now some bug fixes and API improvements in the attached patch.
Comment #4
jrockowitz commentedComment #5
jrockowitz commentedI committed the attached patch and the code snippet from #2 will work with the latest dev release.
Comment #7
spadxiii commentedJust a side-note for future reference: this patch seems to "break" the basic html markup webform element.
Before this patch, the #format of the element was not taken into account at all; it always used the webform setting 'html_editor.format'.
The basic html markup sets #format explicitly to FALSE. Use the advanced html markup field instead.
Comment #8
zenimagine commentedWhere is this option ? I can not find it, I only have HTML editor settings in /admin/structure/webform/config/elements
Comment #9
jrockowitz commented@#SpadXIII Does the attached patch fix #7?
Comment #10
spadxiii commented@jrockowitz yes it does: now you get a ckeditor with the default text format in basic html markup elements.
Comment #11
jrockowitz commented