Comments (7)
I was scratching my head with this a little as well, but turns out things are actually being parsed correctly according to the GitHub flavoured Markdown spec. You just need to have a space in between the brackets as shown in the example.
from blocknote.
@matthewlipski But I didn't manually type the brackets I literally just fetched them from my DB and parsed with tryParseMarkdownToBlocks
. To replicate my issue:
1- In blocknote, click the plus button to open the dropdown menu and select checklist
2- Start typing and you'll see an actual checkbox in every line your write (not brackets, but actual interactive checkboxes)
3- Save the content you wrote in a database using graphql or whatever, or maybe even a react state temporarily
4- Parse that content you saved using tryParseMarkdownToBlocks
and it will look like the screenshot above
I didn't add or remove any spaces between any brackets.
from blocknote.
I just checked directly in my mongoDB and it has a space between the brackets:
but when parsed in the client ui:
I consoled logged the notes (before parsing it) and it looks fine with a space between the brackets:
So I'm fairly confident the tryParseMarkdownToBlocks
is removing a space between the brackets or doing something else wrong
from blocknote.
the console.log is showing that there's a space between the brackets, but the tryParseMarkdownToBlocks
isn't
from blocknote.
@matthewlipski or maybe it's replaceBlocks
that's removing the space between brackets?
from blocknote.
@matthewlipski Oops my bad, the problem is in replaceBlocks
and not tryParseMarkdownToBlocks
I console logged the parsed blocks and it's keeping the space between the brackets
So the problem is 100% coming from replaceBlocks
from blocknote.
Nice find, thanks for diving into this!
from blocknote.
Related Issues (20)
- Links in custom non-editable blocks open twice HOT 1
- Inconsistent position of menu for a block close to bottom of the viewport
- SuggestionMenu collapses when you click the label HOT 2
- Add a classname to the active block so a custom style can be applied HOT 2
- Errors when using blocksToFullHTML with Image block
- Feedback for “Converting Blocks to HTML” HOT 2
- Drag and Drop Block Issue with VanillaJS in SvelteKit HOT 3
- When deleting the last row/column in a table block, the table still exists HOT 1
- Sublime Text 3 builder reports errors in the presence of @types/parse5 HOT 1
- Opting out from animations
- Copy to Clipboard Error in Firefox HOT 2
- Coping whole table cell is not possible HOT 1
- Input requiring conversion to LinkToolbar in CJK environment results in double input HOT 1
- Colors toolbar scrolls whole screen HOT 4
- Error When Pasting After Cutting an Image or a Custom Block
- filterSuggestionItems doesn't work when typing Korean HOT 1
- Feedback for “Suggestion Menus”
- 团队协同bug,caught TypeError: Cannot read properties of undefined (reading 'nodeSize')
- can not resize too slim when text in table cell is too long
- when past rich text on table cell, the table is broken
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blocknote.