-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add select filed in header bar on editor #55
Comments
Please go thru the demo.js file in detail. Scroll to the bottom and modify the following code to add new desired option in top header bar. ,{ |
I have overide grapejs.init in my code.not in the demo.js
|
@desilvaNSP if the built-in button interface (illustrated also by @sirsmac) doesn't fit your needs just use your UI components. var selectEl = $('<select> <option>Desktop</option> <option>Tablet</option> </select>');
selectEl.appendTo('#gjs-pn-options .gjs-pn-buttons');
selectEl.on('change', function() {
// Use GrapesJS's API if you need to
editor.setDevice(this.value);
}); |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
How can I add select filed on header bar
please give me a solution for my problem
I want to add custom UI element on your header bar in editor,How can i do it?
The text was updated successfully, but these errors were encountered: