[REQUEST] WYSIWYG tiny in custom_html control

Support MB Builder [REQUEST] WYSIWYG tiny in custom_html control

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #42707
    KevinKevin
    Participant

    Hi everyone @MB.IO,

    As an improvement, would you consider creating a Control::Wysiwyg for custom_hml (and others if needed) ?
    is there any way we could add our own Control ?

    I'm currently working on a solution, but i think we are stuck with that list of Control, with no way to filter/add some :

    
    'Checkbox'         => false,
    			'KeyValue'         => [],
    			'ReactSelect'      => [],
    			'IncludeExclude'   => [],
    			'ShowHide'         => [],
    			'ConditionalLogic' => [],
    			'CustomTable'      => [],
    

    Found in wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box-builder/src/Control.php

    i also check in app.js for the builder, i guess something should be added like so :

    
    /****/ "./app/controls/Wysiwyg.js":
    /*!*********************************!*\
        !*** ./app/controls/Wysiwyg.js ***!
        \*********************************/
            
    /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
        "use strict";
        eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _DivRow__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DivRow */ \"./app/controls/DivRow.js\");\n/* harmony import */ var _hooks_useApi__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../hooks/useApi */ \"./app/hooks/useApi.js\");\n\n\n\nconst Wysiwyg = ({\n  componentId,\n  name,\n  defaultValue,\n  ...rest\n}) => {\n  const {\n    getEditorSettings\n  } = (0,_hooks_useApi__WEBPACK_IMPORTED_MODULE_1__[\"default\"])();\n  const editorSettings = getEditorSettings();\n  return /*#__PURE__*/React.createElement(_DivRow__WEBPACK_IMPORTED_MODULE_0__[\"default\"], rest, /*#__PURE__*/React.createElement(\"div\", {\n    id: componentId\n  }, /*#__PURE__*/React.createElement(wp.editor.Editor, {\n    name: name,\n    value: defaultValue,\n    settings: editorSettings\n  })));\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Wysiwyg);\n\n//# sourceURL=webpack:///./app/controls/Wysiwyg.js?");
    
    /***/ }),
    

    can you check on this ?

    It will add flexibility for clients to compose their own html without specific code Knowledge.

    have a nice day

    #42722
    PeterPeter
    Moderator

    Hello Kevin,

    Thanks for your feedback.

    Currently, we do not support adding a custom control type because it is related to the processing field settings. If the client lacks coding knowledge, you can suggest they use the WYSIWYG field to output HTML value in the front end.

    #42726
    KevinKevin
    Participant

    Hi Peter,

    Thanks for your reply.
    Sorry to say, but the solution you provide is not really what i need.
    Btw, I understand that there’s currently nothing up that way.
    For my purpose, clients have to set up form
    Fields on their own, that is why I asked for a wysiwyg in custom_html field.
    That would be a very powerful features !

    Again, thanks for your answer,
    I’ll try to do it on my way, and surely keep you updated.

    Have a nice day !
    K

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.