Johann Posted June 1, 2013 Share Posted June 1, 2013 Dear W3Schools supporters and W3S friends, just had the thought, that it would be great to provide the service on ones websites to mark a text passage "push" a button and get a pop up with a translation in BBC-code format (a little similar like the code BBC) where you can easy copy the part (including a reference to the origin page and post it in php or SMF forums). Not sure if I put it into the right section here, so sorry if not. Does anybody have an idea or even a solution? Reasons for it are:* to be able to make "quick" and nice posts with good references, inks and pics (for the user)* to provide a standard people should quote your site (incl. copyrights) (for the provider) Not to speak about forum owner, who would get right of remembering user to put references to get no copyright troubles. Maybe it's more about an add on the browser side. Not sure it it is useful manageable on the website it self. Currently I do such manual via the generously provided solution here: http://www.seabreezecomputers.com/html2bbcode/ Link to comment Share on other sites More sharing options...
justsomeguy Posted June 3, 2013 Share Posted June 3, 2013 It's just a lot of replacements, probably using regular expressions. The page you linked to has a table on the bottom that lists what they convert, you would probably do replacements similar to those. If you want a Javascript solution then you can add a link or button to any element to run a function, and the function could get the innerHTML of the button's parent node, remove the button itself, and convert everything else using regular expressions then display that in your popup. Link to comment Share on other sites More sharing options...
Johann Posted June 4, 2013 Author Share Posted June 4, 2013 Dear Justsomeguy, Thanks a lot for your hints. Sound easy for somebody who has some knowledge and I would suddenly do such, but I guess that is some sizes to big for my tiny capacity. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now