Closed goddyZhao closed 6 years ago
BTW, the demo page of this project is still using the old version, do it works. But the demo for the latest one does not even work, thanks!
Has anyone figured this out?
+1
@goddyZhao @Method-X I just had a look at the source code, I guess lib/option.js
line 23 return block.getData().syntax;
should be return block.getData().get('syntax');
, since block.getData()
returns an Immutable.Map
object.
This is a bug in our default getSyntax
method, changing line 23 to block.getData().get('syntax')
should work. PRs very welcome!
Since the latest version of this project has changed the default syntax from javascript to null, and it check the syntax by the block data, I just wonder how can I set the block data for it? I tried
Modifier.setBlockData
after toggleStyle but it doesn't work. Any one knows how to make it? Thanks!