I have a single database table that has two text fields that contain html formatted content.
I have looked at the tutorials and credited an update action and then used the Bootstrap 4 Form Generator. If I accept all the defaults then I have a form with all the fields included - my two fields with html content are created as text input.
I would like to be using either a text area or even better the medium editor for updating these fields. I have tried various options (e.g. changing the “type” to text area when using the Generator) but without any success. When doing this then no updates are made to the database.
Similarly I have not been able to get “inner html” to work if I try to update the dynamic attributes even with the default generated form.
Hello,
In the form generator set your form field(s) to textarea. Then on the page select the textarea and click the “Enable Medium Editor” button in the properties panel. This will enable the medium editor in your textarea.
Hi Teodor, I have done what you suggested but now the Save button does not update any of the database fields. Additionally I don’t see the contents of the Description field in the Medium editor before doing changes & using the Save button.
I have included screenshots of the different stages.
Yes they were in the wrong order - see the screen shots. I have fixed this and now the console has no errors but says “value null - mediumEditor.js.107”
But the form is not updating the database (both for the Text Area or any of the other fields)
What do you mean by: " it looks like a normal text input field and not the Medium Editor (or text area)." ?
Have you tried to select parts of the text wit your mouse, so that you can see the editor options?
Done as you suggested - working now ! The update action was missing. Many, many thanks !
Going back to the first issued (scripts in the wrong order) - what might have caused this ? I thought I had created the page in a completely standard manner.
I’ve always assumed this was a bug which was waiting to be fixed. The issue has cropped up quite a few times.
If you select a textarea and click ‘Enable Medium Editor’, there’s no problem. If you select Medium Editor Textarea or Region, from the Elements panel, the files are listed in the wrong order.
Hey Tom,
Can you explain the exact steps to reproduce this, in a separate Bug report topic?
We’ve not really been able to reproduce the issue, but if you know when exactly it happens we will be able to fix it.
Found this thread because I wasn't seeing the dynamic innerHTML showing up. I first manually added Medium Editor Region to my page following this video: https://www.youtube.com/watch?v=HtgIWtUJQSE
Then I saw Teodors' animated gif showing how to enable Medium Editor on a textarea. I then deleted the Medium Editor Region from my page, added a textarea, enabled Medium Editor, applied the dynamic value and still couldn't see anything.
Checking dev tools, I saw the errors described above by @ellisdav showing "MediumEditor is not defined" and the "Unknown component found!" error. Below were the lines in my main.ejs file. They are in the incorrect order according to Teodor. I believe this is from manually adding Medium Editor Region first, rather than converting a text input field...