westonruter / spoken-word

Spoken Word
https://wordpress.org/plugins/spoken-word/
MIT License
48 stars 8 forks source link

omission class #5

Open parmijo12 opened 5 years ago

parmijo12 commented 5 years ago

How can you omit the translation of any section with a class?

westonruter commented 5 years ago

Translation? Do you mean speech?

parmijo12 commented 5 years ago

forgive my English, it's bad. Right, I mean omit the reproduction with some class or other way

westonruter commented 5 years ago

If you want to exclude certain elements from being spoken, you may have luck by passing a custom chunkLeafExcludeFilter to chunkify().

By default it only is excluding sup and sub elements:

https://github.com/westonruter/spoken-word/blob/e0174587806802ba3668ce43e57f0429022d1d08/src/chunkify.js#L11

parmijo12 commented 5 years ago

screenshot_1 I only have one doubt Where do I place the file mentioned in worpress?

westonruter commented 5 years ago

It wouldn't be any file you place. It would be setting an argument to spokenWord.initialize(), specifically the chunkifyOptions. But for the plugin there isn't a way to pass this without #1, so I suggest just modifying the plugin files to see what works.

parmijo12 commented 5 years ago

excellent works perfect, thank you very much !!

westonruter commented 5 years ago

Please share what change you made.

parmijo12 commented 5 years ago

Identify the sup and sub strings of the spoken-word.js file. To this chain I added a class

screenshot_2