Comments (8)
@echenley ahh i see. I ended up doing something similar to what @jjkavalam did.
which fixes the issue for most languages, but still have some problems with markup (the prismjs tokenize functions creates some pretty messy stuff for markup). Once that was fixed, got into even more issues with multi-lang syntax such as JSX, HTML PHP...etc.
Once i have a more complete implementation, will submit a pull request.
Thanks a lot for the help! Bummer that the author moved on
from draft-js-prism.
@mxstbr awesome! I'll clean some stuff up and try to get a PR out this weekend
from draft-js-prism.
any updates on this issue? I am having the same problems. Not just with java, but other languages as well
from draft-js-prism.
@mengfoobar The linked PR above fixes this issue. I had to fork this library and draft-js-code and updated them to fit my use case. Both are pretty clean and comprehensible.
For the record, I doubt this project is actively maintained anymore since the author no longer uses draft-js: facebookarchive/draft-js#388 (comment)
from draft-js-prism.
I've pinged the author and he's given me commit permissions and publish access on npm to take over maintaining this library. Did you ever get anywhere with that imlementation @mengfoobar?
from draft-js-prism.
Awesome, can't wait @mengfoobar! Let me know if you need any help 😊
from draft-js-prism.
Also, do note that #11, #14 and #18 have attempted to solve this problem, so it'd be great to hear what you think of those solutions and how yours is different/better?
from draft-js-prism.
Since I didn't get any response here and really needed this, I merged #17 which fixes this issue beautifully.
@mengfoobar if you still have some improvements on top of that I'd love to still have that followup PR!
from draft-js-prism.
Related Issues (18)
- Consider the same API as draftjs-plugins HOT 7
- How to use it as a code editor only HOT 1
- Fix the default getSyntax HOT 5
- Warning in latest React: "Unknown props `decoratedText`, `entityKey`, `offsetKey` on <span> tag" HOT 1
- Registering tab as N spaces (or literal tab) HOT 3
- In the local demo the code is not highlighted HOT 5
- Different language highlighting examples HOT 3
- Error createEmpty
- Can't get it working. Tokenization not happening. HOT 2
- :question: why iterate over 'childtokens'?
- When having several lines of code, not highlighted properly HOT 1
- block.getData() HOT 1
- allow for no syntax? HOT 2
- Getting this to work with webpack HOT 2
- More languages for highlighing HOT 1
- No syntax highlighting HOT 7
- Component's children should not be mutated. HOT 2
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 draft-js-prism.