formatting in Dreamweaver using the dropdowns - dreamweaver

if I want to format a small snippet of text using the dropdowns (ie Heading 1, 2 paragraph), it often ends up changing the tag for a large snippet of text (or even half the page).
How do i change this behaviour?

When you select part of a tag in Dreamweaver and change the format, DW will change the format of the parent tag.
What you are describing requires a different technique as you are trying to get inline formatting. You need to select the text and then wrap it with a span tag (Danilo's advice is correct in that regard). You then apply the CSS style you want to the span tag to change the format.
So to style No longer want to receive these updates it would look like so:
<p>No longer <span style="font-size:18px;">want</span> to receive these updates?</p>
After DW gets through with it. In Design View after wrapping the text with span, select in the Tag Inspect and switch the Property Bar to CSS mode to style.

When used like this the property inspector will expand the selection to include the parent tag of the selected text, causing the selected option in the property inspector (p, h1, h2, etc) to replace the parent tag with the selected option. you cannot change this operation.
You can make a selection, hit CTRL+T (CMD+T I assume on Mac) which brings up the Wrap Tag editing option, type your tag, then hit enter and the selection will be wrapped with the tag of your choice.

Related

Does any browser / add-on have at Inspect Element the option to display (highlight) only modified and new added values?

As web designer maybe you use daily the browser (Firefox / Chrome) Inspect Element tool more than browsing.
Sometimes to obtain the desired result is very complicated, the CSS changes & the new values added thru browser Inspect Element tool does not apply to only one element (div, p, span etc). After you accomplish the desired result do you have the option do highlight the values that was modified and new values added with a different color or in a separately menu / section?.
For example:
Display with yellow background modified values.
Display with red background new values added.
Question: Does any browser / add-on have at Inspect Element the option to display (highlight) only modified and new added values?
Of course, will be so gorgeous to have a separate menu / section to display separately all modified & new values inserted.
I can't believe it, but Inspect Element in Firefox has exactly what I've looking for:
1. Highlight modified and new added values
2. Copy modified rules
Now you can style at once multiple div's / span's / paragraphs, pseudo-elements etc till you'll accomplish your desired result. After that you can copy from one place all modified rules in different elements, at a 1 click!
If you use Inspect Element for CSS as a right little panel / sidebar (how I use) => see in picture the "blue arrow" (click that black arrow and menu "Changes" will appear).
I hope to help others this great feature of Firefox (well hidden), which will save you a lot of time!
I do not find this function in Chrome browser (or is better hidden than in Firefox).

Custom Cell Formatter to Hide/Show Truncated Text

One of the columns in my table can contain a large amount of text, several paragraphs. This causes each row to be very tall and the table not readable.
I would like to set up a custom formatter for this column to automatically truncate the viewable text after X characters (X would be configurable) and include ellipses after that point and then display a "Show More" link. Clicking on "Show More" would then reveal all of the text in the cell, causing the row's height to expand to show all of the text, then toggling the "Show More" link to say "Show Less". Clicking on "Show Less" would return to the truncated view of the cell.
I can get part of this to work by simply returning from the custom formatter the first X characters of the text followed by a an element with display set to null containing the rest of the text. Clicking on "Show More" would change the element's display to inline.
In one sense this works, because the hidden text is displayed in part when Show More is clicked, but only the part that will fit into the existing cell's size. The rest is hidden and an ellipses is added.
For example, the initial load would show:
The quick brown fox jumped over the lazy
...Show More
Then after toggling it would show:
The quick brown fox jumped over the lazy dog... [this ellipses is added automatically by the CSS]
Show Less
How do I get the cell to expand to show all of the text?
A trickier version of this is to support HTML content, which can't be truncated as easily and still support showing the formatting properly. text-overflow:ellipses seems like it might solve that problem, but I have not figured out how to get it to work in this context. Indeed, text-overflow:ellipses might overall be a simpler solution to this problem if it can be made to work.
Btw, the alternative is to show the full text in a modal dialog, although I have not investigated that approach yet. (I don't think Tabulator supports a modal dialog out of the box, so I would need to add one, such as jquery's. See: Does anyone have or know of any example of a custom popup editor for Tabulator?)

how to change text dynamically with raphael

Ok, this is basically what I'm doing right now. I create the raphael text object. I use a click event to open a dialog box. Then I make the changes to the text in the dialog box. This isn't how I wish to implement this though. I want my implementation to be somewhat similar to the way text is created in MS Paint where the user can click on the text object and change the text as they're typing. Does anybody know how to implement this using a raphael text object?
A simple solution would be to create a <textarea> when the user starts editing the text. Fill it with the current text and place it over the text object. Then, when it loses focus (onblur), remove the text area and copy the text back into the text object.
If you really want to edit the text "in place" in the text object, then you can let the user type in a hidden text field. But in this case you'll have to implement all the cursor and selection logic yourself. See this fiddle (which only allows using the right and left arrows to move the cursor, with shift to select text so that you can copy and paste).
Alternately, I don't know if contenteditable works for SVG content, but that would be a very simple solution if it did work.

ASPxHtmlEditor disable HTML input

I want my ASPxHtmlEditor to show text as plain text(this is for some requirement where in I will have to disable HTML editor and show text as normal text only for few users). Is it achievable? I have set the HtmlEditorToolbar visibility to false. But still if i copy and paste colored text the editor will show the colored text.
If this not achievable only option will be to show a normal aspx text area for few users and DevExpress ASPxHtmlEditor editor for other users.
I believe it is possible to use both the ASPxHtmlEditor for the rich text and ASPxMemo/textarea for the plain text.
Perform the necessary checks and decide which control should be shown. Hide another control by setting its Visible property to false.
Then, bind the ASPxHtmlEditor.Html or ASPxMemo.Value property with the corresponding field and display it to an end-user.
P.S. Why don't you contact the DevExpress guys regarding your inquiry?

Dynamic Layouts in Filemaker

First off I am new to FM but I have a good handle on the basics. What I need to do is this - in a contact information type layout I want to be able to alter the layout based on a specific field. Ex. When the record is brought up, the background of the layout will change colors for a client, another for vendor, etc.
I tried to change a label based on a field, with no success. My guess is that the layout is static and only the data fields change.
We use FM Pro.
Thanks,
Mark
FileMaker layouts are static, but there are still some things you can do to alter the layout based on the values of fields:
Calculation Fields
If you want the data shown in an area to change, you can use a Calculation field. A typical example of this would be a status field. To do this you would add a new field to your table and use enter a calculation on that field like:
Case (
IsEmpty(myTable::myField) ; "Please enter a value for myField." ;
myTable::myField = "wrong value" ; "Please enter a correct value for myField." ;
"Everything seems okay."
)
Conditional Formatting
To make things like background color change you can use a conditionally formatted field. I will typically add an empty numeric field (for this example we'll call it emptyField) and set it so that it can't be edited during modification.
If you place emptyField on your layout, below all the other fields and disallow the user to enter the field in either Browse or Find mode, you can then use conditional formatting to change the field's color.
Portal Hiding
You can use this technique when you want some elements of your UI to disappear when they aren't needed. For example, if you want a "submit" button to appear only when all of the records on a field are filled out.
To use this technique I will usually create a Calculated number field, called ReadyForSubmit, on the original table and give it a logical calculation like:
not IsEmpty(field1) and ... and not IsEmpty(fieldN)
(Note that the value of the above function would be 1 or 0)
I will then create a new Support table in my database and add to it a field One with a calculated value set to 1.
I will then make a relationship between myTable::readyForSubmit and Support::One.
On the layout, create a portal with one row. Put your Submit button in that layout. Now, when readyForSubmit calculates to 1 the button will appear. When it calculates to 0 the button will be hidden.
Hidden Tab Browser
Finally, you can use a tab browser where you set the title font size to 1 point, hide the border, and control the browser programmatically. You can use this for having different field arrangements for different types of records. To do this you would first give an Object name to each tab of the tab browser, say Tab1, Tab2, Tab3.
Then you would add a script, goToTab, with the logic for when you want to go to each tab. Say:
If (myTable::myField = "corn")
Go to Object (Tab1)
Else If (myTable::myField = "squash")
Go To Object (Tab2)
End If
You would then use Script Triggers to run goToTab when On Record Load.
With the release of filemaker 13 there may be another way to do this. You could use a slide control, name the panels in the control, and conditionally switch to the correct panel based on the record type.
you would drop the appropriate fields for the record type in each panel.
http://help.filemaker.com/app/answers/detail/a_id/12012/~/using-slide-controls-and-slide-panels-in-filemaker-pro

Resources