Last active
September 7, 2015 17:23
-
-
Save dcsaszar/a2729ba2e04d56dd79b9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scrivito.on 'content', (content) -> | |
if scrivito.in_editable_view() | |
$(content).find(''' | |
[data-scrivito-field-type=stringlist]:not([data-editor]), | |
[data-editor~=stringlist] | |
''').each -> # ... | |
scrivito.define_editor "stringlist", | |
can_edit: (dom_element) -> $(dom_element).data("scrivito-field-type") == "stringlist" | |
edit: (dom_element) -> # ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scrivito.select_editor (element, editor) -> | |
if $(element).data("editor") == "slider" | |
editor.use "slider" | |
if $(element).data("editor") == "redactor" | |
editor.use "redactor" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment