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
52f1e432
Commit
52f1e432
authored
4 years ago
by
chris
Browse files
Options
Downloads
Patches
Plain Diff
only check title text
parent
4ef0b1ac
No related branches found
No related tags found
1 merge request
!252
only check title text
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
editors/editoria/src/config/config.js
+7
-2
7 additions, 2 deletions
editors/editoria/src/config/config.js
wax-prosemirror-components/src/components/TitleButton.js
+4
-1
4 additions, 1 deletion
wax-prosemirror-components/src/components/TitleButton.js
with
11 additions
and
3 deletions
editors/editoria/src/config/config.js
+
7
−
2
View file @
52f1e432
import
{
emDash
,
ellipsis
}
from
'
prosemirror-inputrules
'
;
import
{
debounce
}
from
'
lodash
'
;
import
{
columnResizing
,
tableEditing
}
from
'
prosemirror-tables
'
;
import
{
InlineAnnotationsService
,
...
...
@@ -54,9 +55,13 @@ import invisibles, {
paragraph
,
}
from
'
@guardian/prosemirror-invisibles
'
;
const
updateTitle
=
title
=>
{
// const updateTitle = title => {
// console.log(title);
// };
const
updateTitle
=
debounce
(
title
=>
{
console
.
log
(
title
);
};
}
,
3000
)
;
const
saveTags
=
tags
=>
{
// console.log(tags);
...
...
This diff is collapsed.
Click to expand it.
wax-prosemirror-components/src/components/TitleButton.js
+
4
−
1
View file @
52f1e432
...
...
@@ -31,13 +31,16 @@ const TitleButton = ({ view = {}, item }) => {
const
serviceConfig
=
app
.
config
.
get
(
'
config.TitleService
'
);
let
chapterTitle
=
''
;
if
(
titleNode
[
0
])
chapterTitle
=
titleNode
[
0
].
node
.
textContent
;
useEffect
(()
=>
{
if
(
titleNode
[
0
])
{
serviceConfig
.
updateTitle
(
titleNode
[
0
].
node
.
textContent
);
}
else
{
serviceConfig
.
updateTitle
(
''
);
}
},
[
JSON
.
stringify
(
titleNode
[
0
])
]);
},
[
chapterTitle
]);
const
isActive
=
!!
active
(
state
,
activeViewId
);
let
isDisabled
=
!
select
(
state
,
activeViewId
,
activeView
);
...
...
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