473,410 Members | 1,889 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,410 software developers and data experts.

Math Editor

13
Hi
I need help in creating a math editor to my form. Please tell me how to create a math editor which includes all symbols like sigma,pi etc. By clicking a button i want to get open the math editor. And after selecting the symbol from math editorit should seen like <font symbol=√>√</font> Please tell me how to do that.√=&#8730The value alone will seen inbetween font tags &#8730
Mar 22 '13 #1
10 2350
gits
5,390 Expert Mod 4TB
for a start have a look here: http://mathdox.org/formulaeditor/
Mar 22 '13 #2
mini13
13
But is that not possible to create by our own.
Mar 22 '13 #3
gits
5,390 Expert Mod 4TB
sure - just have a look at the code there to see how they solved the issue - to get an idea of it
Mar 22 '13 #4
mini13
13
Ok gits. I will see the code to get some idea.If any doubts i will ask you again.
Mar 22 '13 #5
mini13
13
Sorry i cann't understand the code http://mathdox.org/formulaeditor/
Mar 25 '13 #6
mini13
13
Please help me with some samples. Please
Mar 25 '13 #7
r035198x
13,262 8TB
Difficult for people to help if they don't know what you don't understand from the given code. Is it too complex for you? Are there constructs in it that you don't understand? If it looks like the code is too advanced then go back to basic tutorials like the W3Schools tutorials here :http://www.w3schools.com/js/default.asp
Otherwise you need to say what you don't understand or people won't know how to help.
Mar 25 '13 #8
mini13
13
I have some sample code for the math editor.

Expand|Select|Wrap|Line Numbers
  1.  
  2. <html>
  3. <head>
  4.     <style>
  5.         .popup {
  6.             position: absolute;
  7.             left: 100px;
  8.             top: 100px;
  9.             border: 1px solid #000;
  10.             background-color: #f0f0f0;
  11.         }
  12.  
  13.         .popup .symbol {
  14.             display: inline-block;
  15.             padding: 5px;
  16.             margin: 10px;
  17.             border: 1px solid #000;
  18.         }
  19.     </style>
  20.     <script>
  21.         var symbolPopup = null;
  22.         function CreateSymbolPopup () {
  23.             if (symbolPopup) {
  24.                 return;
  25.             }
  26.  
  27.             symbolPopup = document.createElement ('div');
  28.             symbolPopup.className = "popup";
  29.  
  30.             var symbols = [8719, 8721, 8730];
  31.             for (var i = 0; i < symbols.length; i++) {
  32.                 var symbolButton = document.createElement ('span');
  33.                 symbolButton.innerHTML = '&#' + symbols[i] + ';';
  34. //alert(symbolButton.innerHTML);
  35.                 symbolButton.onclick = AddSymbol;
  36.                 symbolButton.className = "symbol";
  37.                 symbolPopup.appendChild (symbolButton);
  38.             }
  39.             document.body.appendChild (symbolPopup);
  40.         }
  41.  
  42.         function ShowSymbols () {
  43.             CreateSymbolPopup ();
  44.             symbolPopup.style.display = "";
  45.         }
  46.         function HideSymbols () {
  47.             if (symbolPopup) {
  48.                 symbolPopup.style.display = "none";
  49.             }
  50.         }
  51.  
  52.         function AddSymbol () {
  53.             var editor = document.getElementById ('editor');
  54.             editor.value += this.innerHTML;alert(editor.value)
  55.             HideSymbols ();
  56.         }
  57.     </script>
  58. </head>
  59. <body>
  60.     <button onclick="ShowSymbols ()">Symbols</button>
  61.     <textarea id="editor"></textarea>
  62. </body>
  63. </html>
  64.  
But when clicking the symbol button I want to view the symbol into my form.Notoutside my form. Also i wnat to do by clicking the symbols, The symbols not get entered directly to my textarea. Its corresponding value is to get entered. eg &#62
Mar 25 '13 #9
r035198x
13,262 8TB
Which form? I don't see a form in your posted code.
Mar 25 '13 #10
mini13
13
I haven't posted my form. Its only a sample for the math symbols.
Mar 25 '13 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Joachim Spoerhase | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, does anybody know a good WYSIWYG MathML Equation Editor for Linux? Many thanks in advance Joachim Spoerhase -----BEGIN PGP...
17
by: Harlan Messinger | last post by:
I am reviewing a set of pages, some of which include in-line mathematical formulas represented as images. I am addressing the accessibility issues behind those images. (Conformance to Section 508...
9
by: Stud Muffin | last post by:
Hey Basically, I'm trying to take objects created in microsoft word using equation editor (for creating clean looking math/physics equations) and putting them into some sort of webpage format....
6
by: Bonj | last post by:
Hi How do developers that use the SDK (not full-blown VS IDE) create dialog boxes? Do they type out the DIALOG resource section of the .rc file manually? Use a third-party program? Or cheat,...
26
by: canteyn | last post by:
I am currently working on a lab for my computer science class, and we are to write program (using a function) to calculate the monthly payment. We also are reading the principal loan, interest rate,...
15
by: lbrtchx | last post by:
I am trying to write up a page with Math formulas (statistical ones) ~ http://www.geocities.com/tekmonk2005/OnLineStats02.html ~ The thing is that I am not able to make it look OK using HTML. I...
3
by: gradeexrex | last post by:
I'm not a professional dba or dbd, but I'm proficient in the basics of database design and sql. I want to create a database of math definitions, and I'm wondering how one would go about creating a...
4
by: T | last post by:
hi, Just wondering what tools are available for authoring in XML for docs that have complex math environments. Like equation arrays, multiline equations, etc. The kind of environments AMSLaTeX...
2
by: Richard Ballin | last post by:
Hello All, I am taking a class using Visual Studio C++ Express 2010 and on one of the first projects i need to use the Math::Pow() function. The book does not do a good job of explaining how to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.