Balto Posted July 7, 2022 Posted July 7, 2022 Hello, is there way to automatically change the editor html code when you save a post/record? So for example, if in the editor I write Quote <p> Text 1 </p> When I save the post/record it will automatically be changed into Quote <p> <strong>Text 2</strong> </p> Thanks!
Marc Posted July 7, 2022 Posted July 7, 2022 You could use word filter in system->Settings->Posting, however you will struggle with it replacing code in that manner. it would be words only
Balto Posted July 7, 2022 Author Posted July 7, 2022 41 minutes ago, Marc Stridgen said: You could use word filter in system->Settings->Posting, however you will struggle with it replacing code in that manner. it would be words only Hello Marc, so the word filter does not accept html code?
Randy Calvert Posted July 7, 2022 Posted July 7, 2022 (edited) Code would be difficult because you can’t control formatting. Things like spaces, tabs, etc all make parsing code almost impossible to do accurately. <b> This is a test </b> is different than <b>This is a test</b> Edited July 7, 2022 by Randy Calvert
Marc Posted July 7, 2022 Posted July 7, 2022 That is correct. It works with the output text, rather than the source
Balto Posted July 7, 2022 Author Posted July 7, 2022 6 minutes ago, Randy Calvert said: Code would be difficult because you can’t control formatting. Things like spaces, tabs, etc all make parsing code almost impossible to do accurately. <b> This is a test </b> is different than <b>This is a test</b> Yeah, but I would need only the text start with <b> This to be automatically changed into <b>This This is not possible to realize?
Marc Posted July 7, 2022 Posted July 7, 2022 As mentioned, this is not possible at present, as it looks at the text output, not the source. Balto 1
Recommended Posts