gaya Posted March 4, 2013 Share Posted March 4, 2013 Hi,Please tell me how to include all mathematical expressions in a clipboard and when clicking the font button, the clipboard is to get open. After by selecting the expression,corresponding value is seen between the font tags. Is it possible to do.Please tell me. Link to comment Share on other sites More sharing options...
Ingolme Posted March 4, 2013 Share Posted March 4, 2013 Mathematical expressions are a really complicated thing to handle. HTML is not prepared for it, so the current approach is to use images of the expressions. Font tags are deprecated, so you shouldn't be using them, anyways. There's a language called MathML but there's almost no support for it in browsers, and less if the expressions is embedded on the page. Link to comment Share on other sites More sharing options...
gaya Posted March 5, 2013 Author Share Posted March 5, 2013 (edited) Thanks for the reply Ingolme.Actually after clicking the button the corresponding values will be seen like <font>π</font> in my database.This is the value seen in database in the font tag π-π Edited March 5, 2013 by gaya Link to comment Share on other sites More sharing options...
gaya Posted March 5, 2013 Author Share Posted March 5, 2013 Is it possible to desing the math editor with all special characters in it. Link to comment Share on other sites More sharing options...
Ingolme Posted March 5, 2013 Share Posted March 5, 2013 Special characters aren't difficult to handle, you can use entities to represent them. Just look for the proper code for each character in one of these tables:http://www.w3schools.com/tags/ref_entities.asphttp://www.w3schools.com/tags/ref_ascii.asphttp://www.w3schools.com/tags/ref_symbols.asp As for things that can't be represented with HTML I was referring to fractions, limits and summatories in my previous post. Link to comment Share on other sites More sharing options...
gaya Posted March 5, 2013 Author Share Posted March 5, 2013 (edited) The above links i'd viewed already.But i want to store them by creating a editor.<font>π</font><font>°</font>. Is it possible to create a editor instead of entering the values manually.Something like http://www.codecogs.com/latex/eqneditor.php Edited March 5, 2013 by gaya Link to comment Share on other sites More sharing options...
Ingolme Posted March 5, 2013 Share Posted March 5, 2013 It would require Javascript. A simple example of how it could work is like this: <button id="pi">π</button><textarea id="destination"></textarea> <script>document.getElementById("pi").onclick = function() { document.getElementById("destination").value += "π";}</script> 1 Link to comment Share on other sites More sharing options...
gaya Posted March 5, 2013 Author Share Posted March 5, 2013 (edited) Thanks Ingolme. The code you preferred is perfectly working and this is the thing what i want. But you selected it with specific id. If i'm having two textareas means how it is possible. Also please tell me, it should be viewed inbetween the font tag. And also please tell me for all other values whether the same function is used. Edited March 5, 2013 by gaya Link to comment Share on other sites More sharing options...
Ingolme Posted March 5, 2013 Share Posted March 5, 2013 You're going to have to learn Javascript in order to build up on this. The code I gave is really simple, if you learn Javascript you should be able to modify it to work the way you want it to. You'll need one <button> or <input type="button"> for each symbol you want to add to the textarea. You need to use HTML DOM to select the elements you want to apply event listeners to or to modify. 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