I'd like to add some dynamic content into the FCK text box when I'm adding links, for example when I add a link or link some text I want to be able to put some ASP delimeters into the textbox and a variable name. Something like this <%= myLinkVariable %>.
I've tried looking at the textbox content in the source view and adding a simple <% Response.Write("Hello World")%> but like the link text the asp delimeters have been converted to unicode/html like this <% Response.Write("hello world")%>"
Do I need to comment / uncommment the
FCKConfig.ProtectedSource.Add( /<%[\s\S]*?%>/g ) ; // ASP style server side code <%...%>
or any of the other custom items in the custom.js file.
The FCK Editor only deals with HTML content. You won't be able to use it to access server variables, unless you have a custom module designed to parse and evaluate the content.
Related
I'm using Quill in a project where I need make Quill "understands" some custom code when it initializes and when the editor's content is updated from the API.
To keep it symple: lets say I have a database where I have, for example, a field with this content:
<p>Text</p><hr>
On page loading, during Quill'a initialization, I need my
Quill editor's container "accepts" this incoming code but Quill eliminates the <hr> tag.
Reading this guide (Cloning Medium with Parchment) I understood how to create a new Quill's blot and how to add a custom control button in the toolbar to insert the custom blot (lets say the <hr> tag) in my Quill's editor.
Lets call this the "outcoming flow" which I think I get it.
Unfortunately If I save the updated content (lets say <p>Text></p><hr>) in the db, refreshing the page (I'm working with PHP) the <hr> tag is not kept but is "stripped away"...
I'm reading Parchment documentation and I think I should make Parchment "accepts" the new blot (am I right?) but I'm not understanding how...
Here is a symple example: Custom line blot example.
You can see the "insert line" button is working ("outcoming flow" ok) but on page loading the <hr> tag is stripped away ("incoming flow" not ok).
I hope the explanation is clear ^^
Thanks for anyone is going to help me... ^^
I have two different views of each page in an application. One view is the editable view where a user can come and edit stuff.This view has Buttons, Text Input, Text Area etc. The other view is used to just view the data. The buttons should be hidden, Text Input, Text Area which were editable should be replaced with label.
So I have a doubt whether I should have:
(i) two different html files for each view which can be changed inside the router
(ii)same html file and use ng-if
(iii)same html file and create directive for each change
This depends on how many ng-if directives you have to create. In other words how large your view is.
If it is a small view - go for ng-if.
If not, use a separate template for the view.
In Sitecore MVC, FieldRenderer.Render(Item, "Field Name") automatically checks its field type. In another word, all XSLT extensions (sc:text, sc:image, sc:date, …) is affected by the RenderField pipeline.
But, I couldn't find sc:checkbox information and it doesn't show "CheckBox" in page edit mode. It just shows the value of the check box.
How can I make it show as like input type=checkbox in page editor?
Sorry for the link only answer but the general approach here is to use a Field Editor Button.
This will open a pop up window with the content editor style control for the field.
If using a custom experience button is not an option for you, you can output different markup (i.e. your input button) to the client when the page mode is in 'Edit' mode.
This will allow you to present the author with the controls you wish to display, but still output the normal output values for end users.
If you are able to use controller renderings, you can use the controller to load a different view to make this easier, but otherwise you can use if statements within your View to output different markup.
I want to show Tooltip inside Views UI. I installed following two modules:-
Tipsy
Views Tooltip
I have following fields in the Views UI:-
Name[Visible]
Snaps[Visible]
Now add field "Global: Tooltip" inside Views UI. I gave a simple "Hello" in the "Tooltip text".
My requirement is to simply show the hello text as tooltip for snaps inside View.
Tipsy Configuration are as follows:-
Please let me know what am I doing wrong as tooltip is not being shown.
Try checking "child" under content class and check that your page output (use firebug or whatever) does not place the tooltip content class as a sibling (same level) as the tooltip class.
I've got a silverlight 2 app with a Datagrid and a button for exporting it to Excel by making a trip back to the server.
I can create an HTML string representing the datagrid. I'd like to attach this string to an html element, setting MIME type=application/vnd.ms-excel and have a prompt show up asking if I'd like to open or save the xls file.
After all if ASP can do this ...
<% The main feature of this technique is that %>
<% you have to change Content type to ms-excel.%>
Response.ContentType = "application/vnd.ms-excel"
<TABLE>
<TR><TD>2</TD></TR>
<TR><TD>3</TD></TR>
<TR><TD>=SUM(A1:A2)</TD></TR>
</TABLE>
... it seems like I should be able to do something similar from within Silverlight, pushing it onto the HTML DOM.
Any suggestions greatly appreciated!
You can always copy the content of the datagrid to the users clipboard using javascript (just create a 'copy to clipboard' button) and then allow them to paste it into their own spreadsheet (just did this for a client, and they were pretty happy with the solution.) I can post code if you need.
Nope that isn't going to happen. You are going to need to get the browser to fetch something from the server that your SL has posted.
You can only write HTML to a browser hosted document when the browser has created the document as a HTML DOM. Hence you can't convince the browser that the stream of text you are writing is another document type like an Excel spreadsheet.
Here's a nice approach that worked for me
http://forums.silverlight.net/forums/p/179321/404357.aspx