Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wax-prosemirror
Manage
Activity
Members
Labels
Plan
Issues
34
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wax
wax-prosemirror
Commits
43e7e2be
Commit
43e7e2be
authored
2 years ago
by
chris
Browse files
Options
Downloads
Patches
Plain Diff
add new icon
parent
96547eb1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!407
Hhmi fixes
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
wax-prosemirror-components/src/icons/icons.js
+6
-0
6 additions, 0 deletions
wax-prosemirror-components/src/icons/icons.js
wax-prosemirror-services/src/OENContainersService/PopulateHeadingsComponent.js
+13
-10
13 additions, 10 deletions
...ces/src/OENContainersService/PopulateHeadingsComponent.js
with
19 additions
and
10 deletions
wax-prosemirror-components/src/icons/icons.js
+
6
−
0
View file @
43e7e2be
...
...
@@ -472,4 +472,10 @@ export default {
<
path
d
=
"
M17 5H20L18.5 7L17 5M3 2H21C22.11 2 23 2.9 23 4V8C23 9.11 22.11 10 21 10H16V20C16 21.11 15.11 22 14 22H3C1.9 22 1 21.11 1 20V4C1 2.9 1.9 2 3 2M3 4V8H14V4H3M21 8V4H16V8H21M3 20H14V10H3V20M5 12H12V14H5V12M5 16H12V18H5V16Z
"
/>
<
/Svg
>
),
refresh
:
({
className
})
=>
(
<
Svg
className
=
{
className
}
fill
=
"
none
"
viewBox
=
"
0 0 24 24
"
>
<
title
>
Refresh
List
<
/title
>
<
path
d
=
"
M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2M18 11H13L14.81 9.19A3.94 3.94 0 0 0 12 8A4 4 0 1 0 15.86 13H17.91A6 6 0 1 1 12 6A5.91 5.91 0 0 1 16.22 7.78L18 6Z
"
/>
{
'
'
}
<
/Svg
>
),
};
This diff is collapsed.
Click to expand it.
wax-prosemirror-services/src/OENContainersService/PopulateHeadingsComponent.js
+
13
−
10
View file @
43e7e2be
/* eslint-disable react/prop-types */
import
React
,
{
useContext
,
useLayoutEffect
,
useEffect
}
from
'
react
'
;
import
React
,
{
useContext
,
useLayoutEffect
}
from
'
react
'
;
import
{
WaxContext
}
from
'
wax-prosemirror-core
'
;
import
{
DOMParser
}
from
'
prosemirror-model
'
;
import
{
ReplaceStep
,
ReplaceAroundStep
}
from
'
prosemirror-transform
'
;
...
...
@@ -7,13 +7,16 @@ import { Selection } from 'prosemirror-state';
import
styled
from
'
styled-components
'
;
import
{
Icon
}
from
'
wax-prosemirror-components
'
;
const
IconRemove
=
styled
(
Icon
)
`
const
StyledButton
=
styled
.
span
`
cursor: pointer;
`
;
const
StyledIcon
=
styled
(
Icon
)
`
cursor: pointer;
position: relative;
top: 2px;
left: 6px;
height: 16px;
width: 16px;
height: 23px;
width: 23px;
bottom: 5px;
`
;
const
elementFromString
=
string
=>
{
...
...
@@ -80,7 +83,7 @@ export default ({ setPosition, position }) => {
const
allSections
=
[];
doc
.
descendants
((
editorNode
,
index
)
=>
{
if
(
Node
.
type
.
name
===
'
oen_section
'
)
{
if
(
editor
Node
.
type
.
name
===
'
oen_section
'
)
{
allSections
.
push
(
editorNode
);
}
});
...
...
@@ -95,9 +98,9 @@ export default ({ setPosition, position }) => {
if
(
!
readOnly
)
{
return
(
<
b
utton
onClick
=
{
generateHeadings
}
type
=
"
button
"
>
generate
<
/
b
utton
>
<
StyledB
utton
onClick
=
{
generateHeadings
}
type
=
"
button
"
>
<
StyledIcon
name
=
"
refresh
"
/>
<
/
StyledB
utton
>
);
}
};
This diff is collapsed.
Click to expand it.
Preview
0%
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