This AS.form plugin is a wrap to TinyMCE.
Developed and maintained by balestra
Licensed under Creative Commons Attribution 4.0 License for free personal/professional/commercial use, with attribution.
Includes TinyMCE.
Version 1.1, released on 2021-05-05
Fields of type:
tinymce
html
, an alias to tinymce
if field of type html
isn’t defined yet.The double class name is intentional: other plugins, loaded before or after this one, could re-define field type html
.
Plugin URI: https://cdn.altersoftware.org/js-as-form/plugin/as-form-tinymce.js
Plugin name: tinymce
In alternative: asForm.addField(fieldname,'html', {options…} )
Generates a text field with HTML content, and its own WYSIWYG editor.
Common option keys can be used, in addition:
placeholder
(string): empty field placehoder.When an Editor is fully loaded a custom event as:tinyMceInited
is fired on the document
node.
event.detail
is a reference to the actual asField
object.
The event can be used e.g. to rezize the editor:
AS.addEvent(document,'as:tinyMceInited',e=>{
let h = parseInt(window.innerHeight) - 200;
h = String( h > 600 ? 600 : h )+'px';
e.detail.getWrap().querySelector('.tox-tinymce').style.height=h;
});