Web-based equation editor to mathml export? - javascript

I am trying to integrate a mathematical formula editor into a website. I want users to write out an equation in this editor and have the editor export to contain source code in MathML format.
When I play around with the demo and change the equations, the source code does not update to the new equation.
Does this require backend work?
Please no redirections to other formula editors!

For me it does.
q²-1/q-1
then I use their javascript link
javascript:alert(org.mathdox.formulaeditor.FormulaEditor.getEditorByTextArea("formula1").getMathML())
and the result is
mlns="http://www.w3.org/1998/Math/MathML"><mfrac><mrow><msup><mi>q</mi><mn>2</mn></msup><mo>-</mo><mn>1</mn></mrow><mrow><mi>q</mi><mo>-</mo><mn>1</mn></mrow></mfrac></math>
when I change the formula to
q²-1/q-2
I get
<math xmlns="http://www.w3.org/1998/Math/MathML"><mfrac><mrow><msup><mi>q</mi><mn>2</mn></msup><mo>-</mo><mn>1</mn></mrow><mrow><mi>q</mi><mo>-</mo><mn>2</mn></mrow></mfrac></math>
It definitely changes the value. You should provide an example or something similar as referred to SO 'guideline'. You can have a look here: https://stackoverflow.com/tour

Related

Is there a javascript library for displaying formulas

Are there any javascript libraries for displaying formulas that allow javascript events and styling to be added to parts of the formula?
If is mathematical formulas what you are asking for you might want to take a look at: https://www.mathjax.org/

Converting Processing (cursor) file into a website

I made a cursor in Processing and I would like to use this on my website.
How can I convert it into a .java file to add it to my HTML file?
If you want to use Processing on a webpage, you either have to use Processing.js or P5.js.
But like Chris G said, it's not really clear what exactly you mean by "cursor" here. When most people say that, they mean an image file, in which case you can just use CSS to customize the cursor.
But if you mean you used Processing to create effects using the mouse pointer, then you're going to have to use Processing.js or P5.js, not Java mode. This also means that you won't be able to use any Java libraries in your sketch.
If you have any other questions, please include an MCVE that demonstrates exactly what you're trying to do.

JavaScript textarea editor with custom formatting rules

i need to implement simple text editor with custom (probably dynamic) rules. For example, if user change text somehow i want to run regex (or callback method or something else) on this text and apply formatting for it. For ex all ip addresses in text should have red color, names from specified range - black, all words starting from "abc" - green.
So basically what i need is:
- simple text editor based on text area
- ability so add rules applying to text withing text area
I reviewed a lot of related resources and didn't found any simple solution yet. As for now I've started to implement my own editor with using of contenteditable attribute and JQuery.
I never wrote such functionality before, so could you please point me to the right direction? Maybe i can use already implemented tools or specific strategy?
Thanks a lot.
Maybe it would be useful for someone.
After a bit of investigation at first i tried to use jQuery Highlight Plugin, but it does not cover my all of needs so i used Codemirror editor, which i found very nice and customizable.
I wrote my custom mode and it's working perfectly.
As start point i used this article

Is it possible to use web development tools and create an actual working WYSIWYM math editor, like desktop Applications such as MathType?

Before I started to try and make this thing, I wanted to know if it is possible, under the following circumstances:
The code to script up that math must be able to be taken, submitted and stored in a database
The code for two pieces of math which look exactly the same must have the exact same code
According to the requirements, wherever the user clicks his or her mouse, the caret must move to that specific element or part of the math
So, is it possible? I'm looking forward to using technologies such as HTML, JavaScript, jQuery, and even Flash as a last resort.
MathQuill lets you type maths in a WYSIWYG fashion, source here.
There is a demo on the homepage.
I think you want something like MathML. Take a look here. http://www.w3.org/Math/
or maybe http://code.google.com/p/mathmleditor/
I found this a while ago http://www.codecogs.com/latex/eqneditor.php pretty useful implementation of LaTeX with a live preview, I've used it a few times. Probably doesn't fit the bill for your point 3 either but just in case it is useful.

Customizable Web Based Editor?

I'm looking for a web-based wysiwyg style editor, that is straight-forward to customize. I want to limit the options to just a few choices...
undo/redo, uppercase, lowercase, spellcheck, find, clipboard options, and only a few choices of style that I would like to be able to name and possibly write the code for. It will basically grab the text around the cursor (without having to necessarily select) and format it according to parts of a video script.
What is a good editor to do this with (easy points to customize), and is there any examples of possibly similar customizations being done like this already out there?
Try http://ckeditor.com/demo
It used to be called fckeditor earlier.

Categories

Resources