Topic: Change WYSIWYG Core Default Value (TEXTAREA_DEFAULT_VALUE)
ewgiddings asked 5 years ago
Expected behavior
I want the WYSIWYG editor to show up as a blank document, or with personalized default values, even when not using NgModel or any ControlValueAccessors.
Actual behavior
Default values are MDB branded. To change this do I go into every file and change the value of TEXTAREA_DEFAULT_VALUE?
I know I can change the value on load using NgModel, but if there is an error or abnormality I would like to put my own websites message there instead of the MDB themed default values.
Resources (screenshots, code snippets etc.)
See WYSIWYG editor docs. I do not want that content to show up in the editor on load of a basic editor (one without NgModel being used)
See TEXTAREA_DEFAULT_VALUE in the node_module folder for mdb-wysiwyg (If I change this value will it take effect in my site?)
Please advise?
Thank you!
Damian Gemza staff answered 5 years ago
Dear @ewgiddings
There's no possibility to change this default text because they're constant.
You can change it in node_modules/mdb-wysiwyg/fesm5/mdb-wysiwyg.js
file (but you have to notice, that if you'll change the node_modules content, those changes will be overwritten).
We'll think about implementing other functionality to this default text.
Best Regards,
Damian
vitticeps answered 5 years ago
Dear @Damian Gemza
Do you mean is better to use tinymce (from scratch) where it is possible to customise even the toolbar icons (what is needed and what isn't)?
That default content ruin the whole plugin...
Thanks
vitticeps commented 5 years ago
In my project I need to start from blank page (ok, I can remove the default value from the files of the node_module...) When the user comes back to edit the value - how can I get his/her previously saved value in it?
Thanks in advance
vitticeps commented 5 years ago
Wouldnt be hard to add a attribute/function to it what changes the value like
<mdb-wysiwyg value="xyz"></mdb-wysiwyg>
and then each user can set his/hers... if not provided then your MDB stuff populated.
Arkadiusz Idzikowski staff answered 5 years ago
We will take a closer look at this problem and see what we can do about that. For now setting empty value
input should help to achieve blank page on component load.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Free
- Premium support: No
- Technology: MDB Angular
- MDB Version: 7.5.1
- Device: Surface
- Browser: Chrome
- OS: Windows
- Provided sample code: No
- Provided link: No