- Add "Text (formatted)" to a user - leave all settings at default
- Edit account
- Add text to field - Save account
- Edit account change to restricted html, text disappears, add new text - Save account
- Edit account change to Basic Html, text disappears, add new text - Save account
- Can't view text the updated text.
| Comment | File | Size | Author |
|---|---|---|---|
| #28 | text-before.png | 88.94 KB | rteijeiro |
| #28 | text-view-after.png | 36.53 KB | rteijeiro |
| #28 | text-content-after.png | 102.22 KB | rteijeiro |
| #28 | text-after.png | 94.65 KB | rteijeiro |
| #27 | il_570xN.700722414_rsvc.jpg | 30.4 KB | larowlan |
Comments
Comment #1
boyan.borisov commentedComment #2
boyan.borisov commentedComment #3
boyan.borisov commentedIt works if you disabled the javascript. So it should be a javascript issue.
Comment #4
boyan.borisov commentedComment #5
idebr commentedComment #6
swentel commentedSo, lot's of issues it seems with ckeditor and textfields - see https://www.drupal.org/node/971632
Looks like ckeditor by default isn't designed to work with them ..
Why do we even attach an editor to it anyway ? It feels very weird to me. But it also makes little sense on a storage level because you're limited to 255 chars by default.
So, there are a couple of options
- remove text formatted - might be little hard since we do allow it in D7 as well
- do not attach ckeditor to textfields - if you really want one, use long, the use case just makes more sense on a textarea input.
Comment #7
swentel commentedTalked with alexpott - The idea is that we would add a configuration option to the Editor plugin that allows us to tell whether an editor works on a textfield input or not.
Working on a patch for proof of concept.
Comment #8
swentel commentedThis adds 'supports_textfields' to the annotation.
Comment #9
wim leersExactly.
What about this alternative approach? I don't think it ever makes sense to attach a rich text editor to something that cannot even fit a rich text. So then I think we can take this simpler approach.
Comment #11
wim leersSomething like this would easily allow contrib to still support
#base_type => textfield.Comment #12
swentel commentedSo something like this ?
What's the best way to test this ? assertRaw on javascript settings ?
Comment #13
wim leerss/editor/text editor/
string[]
Why do this at the config entity level?
If you grep the code base for
is_xss_safe, you'll see how that other annotation is handled, IMO it should be handled similarly.RE: how to test: see
EditorLoadingTest. You'll want to add a "Text (formatted)" field to e.g. the "page" bundle (not "article", because that's already used for the existing tests). And then something like:… to test the case of a text editor like CKEditor, which does not support
#type => textfield. But you'll probably want to test the inverse too: a text editor that does support that.Comment #15
swentel commentedTest patch - will fix the rest of the review after this comes back
Comment #18
swentel commentedre: 13
1. Fixed
2. Fixed
3. Ok, makes sense (fixes the fail in the previous patch as well at the same time)
4. Tests added: tests unicorn which supports textfields, ckeditor which doesn't.
Comment #20
wim leersMostly nitpicks, one more problematic thing.
Missing
@paramdocs.Also: good catch (that that was missing).
This is now obsolete.
The
editormodule's tests specifically don't depend onckeditormodule. I'm afraid that means you'll have to introduce another dummy text editor, besides the Unicorn one. The upside: you get to pick a funky name! :DCreate a formatted text field, which uses an <input type="text">.FieldStorageconfig::create(FieldConfig::create(Hah :)
Extraneous blank line.
I think we usually put these on multiple lines?
Comment #21
larowlantimezones++
working on nits, will re-assign to swentel when done
Comment #22
larowlanintroducing T-Rex editor :)
fixes #21
Comment #23
swentel commentedLOL t-rex +1
https://img0.etsystatic.com/052/0/6769124/il_570xN.700722414_rsvc.jpg
Comment #25
larowlanfixing fails
Comment #26
larowlanyou need to summon the t-rex
Comment #27
larowlanembedding @swentel's image
Comment #28
rteijeiro commentedLooks good to me! RTBC?
Text Field Settings BEFORE
Text Field Settings AFTER
Text Field Content
Text Field Content Saved
Comment #29
alexpottThis issue addresses a critical bug and is allowed per https://www.drupal.org/core/beta-changes. Committed 7af2ce7 and pushed to 8.0.x. Thanks!
Comment #31
wim leersswentel++
larowlan++
:D
:D
<3