Adding schema markup attributes into Quill.js inner HTML - ruby-on-rails

I’m trying to add a custom button to add FAQ markup schema within my quill editor (Question, AcceptedAnswer). So far I have it working with Registering the buttons in the toolbar, and then slightly alternating them upon save with Nokogiri to add the markup on save, but when the quill container loads upon edit it wipes out these custom attributes. Has anyone else had success creating custom markup buttons before?

Related

Custom scrollbars for <vaadin-combo-box> , impossible?

I'm using vaadin-combo-box and I have a problem. I have no clue how to customize look and feel of scrollbars for the dropdown. I read about styling parts and I know how to do it but this seems to be impossible. Cant figure out the way to select #scroller element because it has been design not to be a "part" to style. However that is the only way I can think of to apply custom style to dropdown scrollbars. How can that be accomplished?
Thanks in advance for help.
#Update
Turns out that as of today there is no way of having customized styling on scrollbars for vaadin-combo-box component. Element responsible for scrolling resides inside contents shadow DOM and is inaccessible from outside nor its going to inherit style implemented on the parent part [part="content"]
The dropdown part is called vaadin-combo-box-overlay, see: https://vaadin.com/components/vaadin-combo-box/html-api/elements/Vaadin.ComboBoxOverlayElement And it is available for styling.
This allows to style the dropdown to some extent, but there is additional shadow root, that prevents to apply e.g. ::-webkit-scrollbar styles on #scroller element.
So the last option would be to make a copy of the vaadin-combo-box html file in right place in frontend directory. It happens so that that file will be used instead of the one coming from webjar. Then you can edit that html file directly. Of course this means that if there are changes in future versions of vaadin-combo-box, you need to copy again, re-apply changes

Jquery UI drag drop not working with custom helper

I'm building simple video editor timeline, I have created custom helper to create new div to place on timeline, but when I drop it changing back to original HTML.
not sure, how to achieve this, so, it correctly placed on the timeline
here preview https://fiddle.jshell.net/surjitsidhu/28cca2w5/1/show/
it can be edited here https://fiddle.jshell.net/surjitsidhu/28cca2w5/1

Orbeon form builder limitation

We faced several limitations when creating form using form builder:
When I drag an UI control into a grid cell, the UI control's label and the UI control itself are top down aligned. How to make both aligned at the same row (side by side). I could only figure out the way to do this by using bootstrap CSS.
When we started to customize the form with CSS more & more due to the form builder limitation, the form designer no longer show the exact form output. This trouble us as we need to test/publish the form to view actual output which defeat the purpose of WYSIWYG editor.
for the time component, is there any option to prefix zero in front of selected hour?
Appreciate anyone can help on this.
Note:
I am using orbeon forms 2016.2 for the form development.

struts form inside table

Basically I have 4 tiles,Header,Content,Left and Right.
When i try to display a table inside a form ,for arranging form elements,My whole structure of the master page is being changed.
Initially the structure which i have defined in the master page ie base layout is being changed and table is being deformed when i create a table inside a form in some middle page. Why is this happening?
I have arranged the and other tiles using a table.
Thanks in advance
which theme you are using in struts2?default theme tend to create some markup while rendering the view so that might causes an issue.you can go ahead with simple theme.
by default it is xhtml and you an switch themes per page basis or for entire application
here are the details
Struts2 Themes
Try using the simple theme on your form:
<s:form action="youraction" method="post" name="yourform" theme="simple">
...
</s:form>
ok.

binding fields in a dialog popup in my view

i have an html table in my asp.net mvc view an i am running into some real estate issues with screen space.
I think in one area of my view i am going to have a button in a column of an html table that says "Details" which, when clicked, loads up some dialog ui. what i am trying to get my head around is that i want the fields in the dialog to also be part of data binding object in the overall form which i am passing to the controller when i submit the form.
is there anything that i should be worried about or anything that you need to do special if you have a form where inside your form you have a button that create a popup with some more details elements. I am just trying to see from a data binding view if there are any issues.
also any examples of doing anything similar would be great.
EDIT
So i tried doing this an ran into a binding issue. i have a follow up question with the specifics about this binding issue with jquery ui dialog here:
why does jquery ui dialog break asp.net mvc's default model binding .
There shouldn't be any issues if you are binding elements from your popup dialog to corresponding hidden elements in your main view. These hidden elements will bind correctly like any other control in your main form.
Of course, you might be POSTing the form elements from your popup form to its own controller method directly, and that is also a perfectly good approach.

Resources