Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VOTE-856 update to wysiwyg embedded icon list #582

Merged
merged 1 commit into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions config/sync/editor.editor.basic_html.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ settings:
- heading6
ckeditor5_list:
properties:
reversed: true
startIndex: true
reversed: false
startIndex: false
multiBlock: true
ckeditor5_sourceEditing:
allowed_tags:
Expand All @@ -56,7 +56,7 @@ settings:
- '<button type class aria-expanded aria-controls>'
- '<ul class>'
- '<li class>'
- '<a href target noreferrer class>'
- '<img src alt height width>'
ckeditor5_style:
styles:
-
Expand All @@ -69,6 +69,7 @@ settings:
enabled_attributes:
- aria-label
- class
- rel
- target
- title
media_media:
Expand Down
1 change: 1 addition & 0 deletions config/sync/editor.editor.simple_html.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ settings:
enabled_attributes:
- aria-label
- class
- rel
- target
- title
image_upload: { }
2 changes: 1 addition & 1 deletion config/sync/filter.format.basic_html.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ filters:
status: true
weight: -10
settings:
allowed_html: '<br> <p class="usa-intro text-align-left text-align-center text-align-right"> <h2 id class="text-align-left text-align-center text-align-right"> <h3 class> <h4 class="text-align-left text-align-center text-align-right"> <h5 class="text-align-left text-align-center text-align-right"> <h6 class="text-align-left text-align-center text-align-right"> <a class href target noreferrer aria-label title> <div id class data-allow-multiple> <button type class aria-expanded aria-controls> <ul class> <li class> <strong> <em> <u> <ol reversed start> <hr> <drupal-media data-entity-type data-entity-uuid alt data-align> <embedded-content data-plugin-config data-plugin-id>'
allowed_html: '<br> <p class="usa-intro text-align-left text-align-center text-align-right"> <h2 id class="text-align-left text-align-center text-align-right"> <h3 class> <h4 class="text-align-left text-align-center text-align-right"> <h5 class="text-align-left text-align-center text-align-right"> <h6 class="text-align-left text-align-center text-align-right"> <a class href aria-label title target="_blank" rel> <div id class data-allow-multiple> <button type class aria-expanded aria-controls> <strong> <em> <u> <ul class> <ol> <li class> <hr> <img src alt height width> <drupal-media data-entity-type data-entity-uuid alt data-align> <embedded-content data-plugin-config data-plugin-id>'
filter_html_help: true
filter_html_nofollow: false
media_embed:
Expand Down
2 changes: 1 addition & 1 deletion config/sync/filter.format.simple_html.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ filters:
status: true
weight: -10
settings:
allowed_html: '<br> <p> <strong> <em> <a href aria-label title class target="_blank"> <ul> <ol> <li>'
allowed_html: '<br> <p> <strong> <em> <a href aria-label title class target="_blank" rel> <ul> <ol> <li>'
filter_html_help: true
filter_html_nofollow: false
2 changes: 2 additions & 0 deletions config/sync/user.role.authenticated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies:
- disable_language
- filter
- media
- paragraphs
- system
_core:
default_config_hash: dJ0L2DNSj5q6XVZAGsuVDpJTh5UeYkIPwKrUOOpr8YI
Expand All @@ -23,3 +24,4 @@ permissions:
- 'use text format simple_html'
- 'view disabled languages'
- 'view media'
- 'view unpublished paragraphs'
13 changes: 10 additions & 3 deletions config/sync/user.role.content_editor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@ dependencies:
- node.type.page
- node.type.state_territory
- node.type.voter_guide
- taxonomy.vocabulary.basics_modules
- taxonomy.vocabulary.nvrf_field
- workflows.workflow.publishing_content
module:
- block_content
- ckeditor5_embedded_content
- content_moderation
- content_translation
- editoria11y
- file
- media
- menu_link_content
- node
- paragraphs
- system
Expand All @@ -32,10 +33,12 @@ label: 'Content Editor'
weight: 2
is_admin: null
permissions:
- 'access administration pages'
- 'access content'
- 'access content overview'
- 'access files overview'
- 'access media overview'
- 'access taxonomy overview'
- 'access toolbar'
- 'create audio media'
- 'create content translations'
Expand All @@ -46,14 +49,15 @@ permissions:
- 'create page content'
- 'create remote_video media'
- 'create state_territory content'
- 'create terms in basics_modules'
- 'create terms in nvrf_field'
- 'create voter_guide content'
- 'delete terms in nvrf_field'
- 'edit any landing content'
- 'edit any nvrf_page content'
- 'edit any page content'
- 'edit any state_territory content'
- 'edit any voter_guide content'
- 'edit own audio media'
- 'edit own document media'
- 'edit own image media'
- 'edit own landing content'
Expand All @@ -62,15 +66,16 @@ permissions:
- 'edit own remote_video media'
- 'edit own state_territory content'
- 'edit own voter_guide content'
- 'edit terms in basics_modules'
- 'edit terms in nvrf_field'
- 'mark as hidden in editoria11y'
- 'translate any entity'
- 'translate audio media'
- 'translate basics_modules taxonomy_term'
- 'translate block_content'
- 'translate document media'
- 'translate image media'
- 'translate landing node'
- 'translate menu_link_content'
- 'translate nvrf_field taxonomy_term'
- 'translate nvrf_page node'
- 'translate page node'
Expand All @@ -80,6 +85,7 @@ permissions:
- 'translate voter_guide node'
- 'update content translations'
- 'update media'
- 'use ckeditor5 embedded content'
- 'use publishing_content transition create_new_draft'
- 'use publishing_content transition restore_to_draft'
- 'view all media revisions'
Expand All @@ -95,4 +101,5 @@ permissions:
- 'view page revisions'
- 'view state_territory revisions'
- 'view the administration theme'
- 'view unpublished paragraphs'
- 'view voter_guide revisions'
6 changes: 2 additions & 4 deletions config/sync/user.role.content_manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ dependencies:
- workflows.workflow.publishing_content
module:
- block_content
- ckeditor5_embedded_content
- content_moderation
- content_translation
- editoria11y
- file
- media
- menu_link_content
- node
- paragraphs
- system
Expand Down Expand Up @@ -80,7 +80,6 @@ permissions:
- 'delete any page content'
- 'delete any remote_video media'
- 'delete any sitewide_alert block content'
- 'delete any state_territory content'
- 'delete any voter_guide content'
- 'delete content translations'
- 'delete landing revisions'
Expand All @@ -92,7 +91,6 @@ permissions:
- 'delete own landing content'
- 'delete own page content'
- 'delete own remote_video media'
- 'delete own state_territory content'
- 'delete own voter_guide content'
- 'delete page revisions'
- 'delete state_territory revisions'
Expand Down Expand Up @@ -152,7 +150,6 @@ permissions:
- 'translate editable entities'
- 'translate image media'
- 'translate landing node'
- 'translate menu_link_content'
- 'translate nvrf_field taxonomy_term'
- 'translate nvrf_page node'
- 'translate page node'
Expand All @@ -163,6 +160,7 @@ permissions:
- 'update any media'
- 'update content translations'
- 'update media'
- 'use ckeditor5 embedded content'
- 'use publishing_content transition archive'
- 'use publishing_content transition create_new_draft'
- 'use publishing_content transition publish'
Expand Down
7 changes: 7 additions & 0 deletions web/modules/custom/ec_placeholder/ec_placeholder.module
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ function ec_placeholder_theme($existing, $type, $theme, $path) {
function ec_placeholder_theme_suggestions_ec_placeholder(array $variables) {
$suggestions = [];
$sanitized_machine_name = str_replace([' ', '-'], '_', strtolower($variables['machine_name']));

// Check if we are creating a category suggestion using :
$array_machine_name = explode(':', $sanitized_machine_name);
if (count($array_machine_name) > 1) {
$sanitized_machine_name = $array_machine_name[0];
}

$suggestions[] = 'ec_placeholder__' . $sanitized_machine_name;

return $suggestions;
Expand Down
9 changes: 9 additions & 0 deletions web/themes/custom/votegov/img/icon/complete.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions web/themes/custom/votegov/img/icon/confirm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions web/themes/custom/votegov/img/icon/mail.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions web/themes/custom/votegov/img/icon/printer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions web/themes/custom/votegov/img/icon/secure.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{% set iconfile = machine_name|lower|replace({'icon:': ''}) ~ '.svg' %}
{{ source(directory ~ '/img/icon/' ~ iconfile ) }}