Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
visual_editor
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
visual_editor
Commits
353dbe61
Commit
353dbe61
authored
11 months ago
by
Jesus Manuel Olivas
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3440521
: Add paragraph open external page
parent
94893d98
No related branches found
No related tags found
1 merge request
!2
🐛 Issue #3440521: Add paragraph open external page
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/visual_editor_paragraphs/visual_editor_paragraphs.module
+1
-6
1 addition, 6 deletions
.../visual_editor_paragraphs/visual_editor_paragraphs.module
src/Form/NodeEditForm.php
+0
-2
0 additions, 2 deletions
src/Form/NodeEditForm.php
with
1 addition
and
8 deletions
modules/visual_editor_paragraphs/visual_editor_paragraphs.module
+
1
−
6
View file @
353dbe61
...
...
@@ -36,7 +36,6 @@ function visual_editor_paragraphs_paragraphs_widget_actions_alter(
}
$entity
=
$context
[
'items'
]
->
get
(
$delta
)
->
entity
;
if
(
!
$entity
)
{
$widget_actions
[
$key
][
'#access'
]
=
FALSE
;
continue
;
}
...
...
@@ -44,10 +43,6 @@ function visual_editor_paragraphs_paragraphs_widget_actions_alter(
$widget_actions
[
$key
][
'edit_button'
][
'#attributes'
][
'data-visual-editor-action'
]
=
'edit'
;
$widget_actions
[
$key
][
'edit_button'
][
'#attributes'
][
'data-visual-editor-storage'
]
=
'paragraph'
;
}
// @todo Implement duplicate button.
if
(
$key
==
'dropdown_actions'
)
{
$widget_actions
[
$key
][
'duplicate_button'
][
'#access'
]
=
FALSE
;
}
}
}
This diff is collapsed.
Click to expand it.
src/Form/NodeEditForm.php
+
0
−
2
View file @
353dbe61
...
...
@@ -126,9 +126,7 @@ class NodeEditForm extends NodeForm {
$bundles
=
array_keys
(
$this
->
entityTypeBundleInfo
->
getBundleInfo
(
'paragraph'
));
foreach
(
$fields
as
$fieldName
=>
$field
)
{
if
(
$field
->
getType
()
===
'entity_reference_revisions'
)
{
$form
[
$fieldName
][
'widget'
][
'header_actions'
][
'#access'
]
=
FALSE
;
foreach
(
$bundles
as
$bundle
)
{
$form
[
$fieldName
][
'widget'
][
'add_more'
][
'operations'
][
'#links'
][
'add_more_button_'
.
$bundle
][
'title'
][
'#ajax'
]
=
NULL
;
$form
[
$fieldName
][
'widget'
][
'add_more'
][
'operations'
][
'#links'
][
'add_more_button_'
.
$bundle
][
'title'
][
'#attributes'
][
'data-visual-editor-uuid'
]
=
$node
->
uuid
();
$form
[
$fieldName
][
'widget'
][
'add_more'
][
'operations'
][
'#links'
][
'add_more_button_'
.
$bundle
][
'title'
][
'#attributes'
][
'data-visual-editor-action'
]
=
'add'
;
$form
[
$fieldName
][
'widget'
][
'add_more'
][
'operations'
][
'#links'
][
'add_more_button_'
.
$bundle
][
'title'
][
'#attributes'
][
'data-visual-editor-storage'
]
=
'paragraph'
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment