Comments (2)
Some docx files can contain styles with id started with digits.
CSS styles can't start with digits.
To solve this issue you need edit file convert.js at line 88 or edit file index.js at line 12725
from
value: function asCssID(a) {
return a.replace(/\s+/g, '_');
}
to
value: function asCssID(a) {
var id = a.replace(/\s+/g, '_');
if (id.match(/^\d/)) id = 'digit-' + id;
return id;
}
from docx2html.
thanks, fixed it as
static asCssID(a){
return a.replace(/\s+/g,'').replace(/^\d/g,d=>""+d)
}
from docx2html.
Related Issues (17)
- basic usage example HOT 7
- How to edit the source to trap unhandled errors? HOT 1
- This is a strange package? HOT 1
- not getting images form docx for html page. HOT 1
- Cannot find file: 'Shape.js' does not match the corresponding HOT 6
- how to set img options?
- Link anchor tags and content after '#' is removed.
- Error with some documents HOT 2
- Cannot Download the html file generated
- Cannot find module HOT 2
- Header & Footer HOT 1
- load file in browser by passing url HOT 2
- Error: Cannot find module 'docx2html' HOT 15
- docx2html style section width, height, margin FAILED Expected '816px' to be '612pt'. at docx2html.catch.then.html (/var/folders/_w/jp7z4q_j2cdct6f9t5x86qkc0000gn/T/7ad8210a5d HOT 1
- Docx from Google docs wont convert HOT 4
- TypeError: this.field is null HOT 1
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 docx2html.