Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Currently sdl_editor_representation is hard coded as the default context for the dnd library in dnd_library(). This can be changed in a library_alter hook, but that is not enough, the sdl_editor_representation is still used when first dragging an atom into a WYSIWYG field. That is probably caused by dnd_library.js using the editor representation as default rendering (line 223).
I want to get completely rid of the editor representation in the WYSIWYG editor, currently that does not seem to be possible.
Comments
Comment #1
jcisio CreditAttribution: jcisio commentedComment #2
jcisio CreditAttribution: jcisio commentedFixed with commit 3c59ba4.
Comment #3
gifad CreditAttribution: gifad commentedSorry, but commit above introduces a lot of variable_get(), but no variable_set() is issued anywhere...
I tried, at the end of function mee_form_alter(), in mee.module :
It works, but the dnd_context_default variable is unique, and ['settings']['context'] is specific to each instance of a body field, so it's definitely not the right answer...
Comment #4
jcisio CreditAttribution: jcisio commentedIt is a global variable. There is no per-field settings in the current approach, because the context is determined when you start dragging. I think it is also possible to override the default context per field, but it is out of scope of this issue.
Comment #5
gifad CreditAttribution: gifad commentedOK, but then what is the context settings of body fields intended for ?
Comment #6
jcisio CreditAttribution: jcisio commentedIt's not the default, but fallback, context.
It is used when there is no context (someone types directly [scald=6] in the field) or the specified context does not exist (removed, or the context provider module is disabled).
Comment #8
arne.olafson CreditAttribution: arne.olafson commentedFor anyone struggling with this, the default context can be changed on a per-field basis:
Structure -> Content Types -> [type] -> Manage fields -> [field] -> Edit
There is a checkbox for Drag'n'Drop Enabled and Select boxes for Default and Fallback Scald contexts