Skip to content
Snippets Groups Projects
Commit 40fc05b3 authored by chris's avatar chris
Browse files

use main for counters

parent 7353e92f
No related branches found
No related tags found
1 merge request!536Counters
...@@ -86,7 +86,10 @@ const Counter = styled.div` ...@@ -86,7 +86,10 @@ const Counter = styled.div`
`; `;
const EditorInfoTool = ({ view: { state }, item }) => { const EditorInfoTool = ({ view: { state }, item }) => {
const { activeView } = useContext(WaxContext); const {
activeView,
pmViews: { main },
} = useContext(WaxContext);
const { t, i18n } = useTranslation(); const { t, i18n } = useTranslation();
const ref = useRef(); const ref = useRef();
const [currentWordCount, setCurrentWordCount] = useState(0); const [currentWordCount, setCurrentWordCount] = useState(0);
...@@ -102,9 +105,9 @@ const EditorInfoTool = ({ view: { state }, item }) => { ...@@ -102,9 +105,9 @@ const EditorInfoTool = ({ view: { state }, item }) => {
}, [activeView.state.selection]); }, [activeView.state.selection]);
const infoDropDownOptions = () => { const infoDropDownOptions = () => {
const docText = activeView.state.doc.textBetween( const docText = main.state.doc.textBetween(
0, 0,
activeView.state.doc.content.size, main.state.doc.content.size,
undefined, undefined,
' ', ' ',
); );
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment