As part of a search function in my application, I need to apply a CSS style to a portion of the text present in the editor.
I found this page which seems to show how to do this by using Attributor. However, it demonstrates applying the style by pressing a button which is recognized by Quill and not the actual code to do it programmatically.
formatText seems to be a possibility but it requires defining the style in the function call while the style is in a loaded css file.
In a "regular" context, I would wrap the text in a span and set a class attribute on it.
What is the Quill way to achieve this?
This stackoverflow issue may help you: it allows you to define a new Parchment format to handle custom class through Quill attributes.
This Quill issue too: How to create your custom marker and a way/method to clean all markers
My guess to achieve what you are trying to do is to find the text inside your Quill document and then apply the formatText with your custom attribute to add the right class producing the right color. Clean then properly once search finished
Related
Dropdowns are useful, but they would be even more useful if the dropdown options could be formatted. For example, using bold or italic text for various selections, or changing the background color of other options on the dropdown display.
It's easy to have a cell formatting change according to the dropdown selected, but that's not what I'm trying to do. I want the formatting of the the dropdown items to be different than simple plain text.
I'm not sure changing the colour of data validation options is possible, but you can exploit the fact that Unicode fonts include italic and bold versions in their extended character sets, and use these characters instead of the usual ones to achieve some of what you want. Use an online tool like (for instance) https://yaytext.com/bold-italic/ to give you the bold/italic versions of your required text options, and add these to your validation list.
It sounds like you are asking for a way to change the appearance of the control that appears when you click the dart in a drop-down cell. The built-in controls in Google Sheets cannot be customized that way.
To implement your own custom controls, use Apps Script to implement a custom dialog box or a sidebar.
A simple script that, for example by selecting a value in a column 5 (change), changes the formatting of the text? Or do you want the text in the validation to be changed?
function onEdit(e) {
if(e.range.getRow()>1 && e.range.getColumn() ==5){
e.source.getActiveRange()
.setFontSize(11)
.setFontWeight('bold')
.setFontStyle('italic')
.setFontLine('line-through')
.setFontColor('#ff0000')
.setBackground('#ffff00')
};
}
I have used FullCalendar inside my angular application. I have created a reusable component using the FullCalendar and use it like this,
<app-full-calendar
[building]="selectedBuilding"
[newEvent]="newEvent"
(clickedEvent)="clickedEvent($event)"
(clickedDate)="dateClicked($event)"
[updatedEvent]="updatedEvent"
[deleteEvent]="deletedId"
></app-full-calendar>
when ever necessary.
The issue is there are custom styling necessities such as changing the cursor of events. In order to achieve this, I have to add custom styles inside the component. But so far I was not able to find any solution.
Consider the given scenario.
I have a class with properties that has all the necessary information regarding a page design. For example I know the line spacings, page number format, text to be displayed, text stye and margin etc.
I want to visualize the exact same page and display it on my Angular SPA. I also want to be able to edit the page layout using text editing tools (just like we have in ant text editing software). For example changing the text color, margins, text size etc and reflect it back to original class instance (two way binding to original object to be precise).
I want to know, Do we have any tool or package that serves the given purpose. If not how we can achieve this requirement in a simple yet effective manner.
Maybe you want to create your class as a component let us say contentComponent in which your class is attached to an HTML file , the HTML file should rely only on data binding and class binding to show content and set the layout of the page , in the other hand create another component editComponent that will get access to contentComponentclass properties through a service to set and change its properties and hence reflecting on the contentComponent view .
I have a list view in SharePoint Online that I'm formatting using JSON. I'm trying to set it so the rows have top borders (ideally, I'd like it to be conditional, but let's walk before we run).
I don't want to do anything else. There are a lot of columns, so I don't want to create a child for each field if I can avoid it. Besides, I don't think that will do what I want.
I've done lots of looking around (including the examples in GitHub, UI Fabric) and it appears that the only way to format a row in a view is to apply a class, and the only classes I can find that seem to be available are the built in ones like sp-field-severity--good. I couldn't find any that just had a top border.
So my questions are these:
- is there a comprehensive list of these classes somewhere?
- can I set a CSS style on a row or create my own CSS class to apply?
SharePoint provide some class for set border color.
Example.
{
"schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
"additionalRowClass": "ms-borderColor-themeDark"
}
We can open the IE F12 developer tools, switch the Debugger tab, search "ms-border", we can see only some class about the border color.
For custom the list view, we can also create custom style for the grid and using SPFx extension to injects custom CSS to achieve some requirement.
Solution: react-application-injectcss
Article: Inject Custom CSS on SharePoint Modern Pages using SPFx Extensions
I have tried searching for this but I do not know the name of the control or UI so I am not having any luck. I'd like to know if there is a name for this UI and if you know of a good link to sample html that would be ideal.
It will be used inside of a jQuery UI dialog box as well as on a standard page within a web app.
Thanks!
You need to use a two-sided multi-select list...
The jQuery two-sided multi-select list converts a normal drop down list into the mock-up you've posted and automatically moves selected items over to the right-hand list as well as adding buttons for movement (plus you can double-click items to move them back and forth).