Opened 4 years ago

# Math plugin doesn't work when used in inline editor created on Paragraph.

Reported by: Owned by: Bram Normal Core : Editable 4.3 Beta

Edit: Please see comment:3[[BR]] Math plugin is disabled when inline editor is created on paragraph.

When using the inline editor on phrased contenthttps://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content the option to add math with the Mathematical Content plugin is disabled.

According to the specs the [itex] element is considered valid phrased content. I guess there is some unnecessary content filtering going on that prevents me from using the plugin? If so, is there a list where I can check which elements/plugins are allowed for each content type (flow or phrased)?

### comment:1 Changed 4 years ago by Jakub Ś

Keywords: inline math phrased disabled removed → invalid new → closed 4.4.0

There is ACF that might be blocking math tags. You can configure ACF to allow math tags but please note there are problems in native contenteditable fields and math formulas. What it means is that you can't freely use mathML in editable elements. It doesn't matter whether this is CKEditor, some other editor or native contenteditable div. You won't be able to use formulas in all browsers.

For that purpouse a plugin has to be created. You can check out our Add-ons repository for such plugins. One of such plugins is: http://ckeditor.com/addon/mathjax.

### comment:2 Changed 4 years ago by Bram

I'm already using the Mathematical Formulas add-on and it works fine when I use it with the inline editor on flow content like a <div>. The problem is the add-on button is greyed out when I use the inline editor on phrased content like a <p>.

Why would ACF block math in one type of content and not the other? Is there an exhaustive list of which content is allowed where by the default configuration or how can I debug this behaviour. Also worth mentioning, is that when I do use the inline editor on flow content I can freely use math in a paragraph created with CKEditor.

The Mathematical Formulas add-on uses LateX notation, not MathML. LaTeX just uses a special delimiter $$ and $$ and its own syntax so there can be no markup conflict because of element tags.

### comment:3 Changed 4 years ago by Jakub Ś

Description: modified (diff) invalid closed → reopened Mathematical content not available for phrased contenteditable fields. → Math plugin doesn't work when used in inline editor created on Paragraph.

Couple of notes:

Why would ACF block math in one type

I didn't understand your description the first time. This is not ACF.

According to the specs the [itex] element is considered valid phrased content

It actually falls under 3 categories http://www.whatwg.org/specs/web-apps/current-work/multipage/the-map-element.html#mathml but as you have already mentioned MathML is not used with this plugin so let's leave this part.

when I use the inline editor on phrased content like a <p>.

This is flow element.

Now the problem.
Paragraph is flow element that can only have phrasing elements inside it. When you initialize inline editor on Paragraph element, plugins like Format Dropdown, Table or Blockquote are completely removed so that tags like Div or H1 weren't inserted into Paragraph (not allowed in HTML).
Mathematics plugin inserts images and spans so it should work but for some reason it is disabled. This plugins isn't removed but it may be missing some code to make it enabled in elements like Paragraphs (just me guessing).

### comment:4 Changed 4 years ago by Jakub Ś

Status: reopened → confirmed → 4.3 Beta

Problem can be reproduced from CKEditor 4.3 beta.