Hi,
I'm really trying to lock down what users can enter in my editor, so that proper semantic markup is enforced.
I've enabled the 'ForcePasteAsPlainText' option, as I've previously had problems with users pasting from Word.
Now this solves a lot of problems, but the text produced isn't completely 'plain'. The text still has <p> and <br/> tags in it. I can live with this, although ideally I'd like some control over it.
More of a problem however, is that when users paste a list from Word, bullet entities are created (•). As I already define how bullets should appear in my CSS, this is causing a mess. I would prefer the bullet entities were removed entirely, and the user can then make the text into a list using the toolbar options.
Ideally, I'd like to write my own function that processes the text to be pasted as I want it.
I realise you can create a CustomCleanWord function, but this hook doesn't seem to work for plain text.
Does anyone have any suggestions?
Thanks,
Gareth
I'm really trying to lock down what users can enter in my editor, so that proper semantic markup is enforced.
I've enabled the 'ForcePasteAsPlainText' option, as I've previously had problems with users pasting from Word.
Now this solves a lot of problems, but the text produced isn't completely 'plain'. The text still has <p> and <br/> tags in it. I can live with this, although ideally I'd like some control over it.
More of a problem however, is that when users paste a list from Word, bullet entities are created (•). As I already define how bullets should appear in my CSS, this is causing a mess. I would prefer the bullet entities were removed entirely, and the user can then make the text into a list using the toolbar options.
Ideally, I'd like to write my own function that processes the text to be pasted as I want it.
I realise you can create a CustomCleanWord function, but this hook doesn't seem to work for plain text.
Does anyone have any suggestions?
Thanks,
Gareth