Exact steps to add custom styles
-
Hi,
I would like to ask about the steps I need to take to add custom styles to the mammoth plugin. It’s not very clear to me.
I have the mammoth plugin installed on my WordPress site in the directory plugins/mammoth-docx-converter. I don’t know whether the files (mammoth-options.js and mammoth-options.php) should be placed in the “plugins/mammoth-docx-converter/mammoth-options” directory or directly in “plugins/mammoth-docx-converter”.
I tried both ways. In Word, I have a style for code called “Code”. I have to manually add code to a file that is visible as
<pre class="wp-block-code">
When I import it with a plugin it is converted to paragraphs for each line instead of
<pre class="wp-block-code">
These are the lines I added to the MAMMOTH_OPTIONS function in “mammoth-options.js”:
"p[style-name='Code'] => pre.wp-block-code:fresh", "p[style-name='Code'] => pre:separator('\\n')",
It seems that it has no effect on the imported file. Works the same as before.
What am I missing here?Thanks
- This topic was modified 2 years, 4 months ago by .
- This topic was modified 2 years, 4 months ago by .
- This topic was modified 2 years, 4 months ago by .
The page I need help with: [log in to see the link]
- The topic ‘Exact steps to add custom styles’ is closed to new replies.