Is it possible to include an html document in the widget settings?
So I got a few options to choose from, but the the amount isn't always the same.
So I need a possibility to dynamically edit the settings window.
Is something like that possible?
I don't think so, as the standard preferences mechanism uses the manifest xml file. So the preferences are handled outside your widget code.
You can always create your own settings button and settings display inside your widget-window.
Related
I occasionally save tutorials from a website as a PDF file for future reference.
My current manual workflow is:
Click the "show on one page" link to get a full single page view of the article.
Open the DevTools of the browser and select sections with advertisements and related links with help of the inspect-functionality and remove them.
Print the page as a PDF file.
I used the Firefox or Chrome-Browser for this, as they both have the required functionality and behave very similarly in that regard.
I noticed that the content I want to remove to get a "clean print" of the content is mostly the same: Let's say all adds are embedded with a div with the class add-banner.
Is there a way to automate these steps?
One idea is to load a custom CSS file that I would need to prepare specifically for a site. Simple rules like .add-banner { display: none; } would allow me to hide the sections that I don't want to print.
I also took a look at console based scrapers because I like the idea to call a command with the URL as a parameter. But the tools I've discovered are image based and I want a indexable PDF file where I can search for text and select parts.
What is the best option to achieve this?
The extension User CSS from the chrome web store (free) allows me to add custom css rules to whatever page is loaded. It is possible to import and export CSS rules and the extension allows to store the custom CSS on a per site base.
This is exactly what I was looking for, since it makes it easier and quicker for me to remove unwanted sections before printing.
Background:
I need to allow users to create web pages for various products, with each page having a standard overall appearance. So basically, I will have a template, and based on the input data I need the HTML page to be generated for each product. The input data will be submitted via a web form, following which the data should be merged with the template to produce the output.
I initially considered using a pure templating approach such as Nunjucks, but moved to ReactJS as I have prior experience with the latter.
Problem:
Once I display the output page (by adding the user input to the template file with placeholders), I am getting the desired output page displayed in the browser. But how can I now obtain the HTML code for this specific page?
When I tried to view the source code of the page, I see the contents of 'public/index.html' stating:
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
Expectedly, the same happens when I try to save (Save As...) the html page via the browser. I understand why the above happens.
But I cannot find a solution to my requirement. Can anyone tell me how I can download/save the static source code for the output page displayed on the browser.
I have read possible solutions such as installing 'React/Redux Development Extension' etc... but these would not work as a solution for external users (who cannot be expected to install these extensions to use my tool). I need a way to do this on production environment.
p.s. Having read the "background" info of my task, do let me know if you can think of any better ways of approaching this.
Edit note:
My app is currently actually just a single page, that accepts user data via a form and displays the output (in a full screen dialog). I don't wish to have these output pages 'published' on the website, and these are simply to be saved/downloaded for internal use. So simply being able to get the "source code" for the dislayed view/page on the browser and saving this to a file would solve my problem. But I am not sure if there is a way to do this?
Its recommended that you use a well-known site generator such as Gatsby or Next for your static sites since "npx create-react-app my-app" is for single page apps.
(ref: https://reactjs.org/docs/create-a-new-react-app.html#recommended-toolchains)
If I'm understanding correctly, you need to generate a new page link for each user. Each of your users will have their own link (http/https) to share with their users.
For example, a scheduling tool will need each user to create their own "booking page", which is a generated link (could be on your domain --> www.yourdomain.com/bookinguser1).
You'll need user profiles to store each user's custom page, a database, and such. If you're not comfortable, I'll use something like an e-commerce tool that will do it for you.
You can turn on the debugger (f12) and go to "Elements"
Then right-click on the HTML tag and press edit as HTML
And then copy everything (ctrl + a)
Where can I put custom input form code in media wiki homepage?
This is so I can modify it into fewer steps for a user to create a new page. The input form will be for entering the title of the new page.
Currently, when adding a page, the user has to search for a page, and if it doesn't exist, it redirects to another page with a link to add the new page. After that it will load the built-in Wiki editor(will also modify this to default to the Visual Editor extension I integrated instead of Wiki editor).
Any input would be greatly appreciated.
There are a number of extensions that can do what you want:
InputBox, is bundled with recent versions of MediaWiki. It is used with Wikimedia wikis, and thus probably very stable.
CreateBox, specifically for letting users create pages
Create Page, more general aproach
Semantic Forms The most fulfledged, but also the most complex, and requires the Semantic MediaWiki extension
You might also want to combine this with some biolerplate extension, e.g. Preloader
As you are posting on SO, I assume that developing your own extension would also be an option. In that case, have a look at the parser functions manual: https://www.mediawiki.org/wiki/Manual:Parser_functions
The file in which i can add/modify a custom input form in the media wiki homepage would be the /rootWikiDir/skins/Vector.php
How can I use a html5 Canvas element in a Joomla Custom Html Module?
Is there an option I am missing? When ever I put the code in the module takes the canvas elements out.
Please Help If you need anymore information please ask.
Thanks!
There are several ways that your HTML can have tags stripped out.
The Editor
The most common is actually the editor you have set up as default. e.g. if you using JCE this is famous for striping HTML because people haven't altered the default "Editor Profile".
In the JCE Control Panel, click on the Editor Profiles button.
Click on the Profile name that the user, usergroup or component is assigned to, eg: 'Default'
Click on the Editor Parameters tab, then on the Options tab and set it up to suite you.
Joomla Text Filters
Unless you're using a Super User account for everyday access (bad idea) you will need to set the user group of your account to have "No Filtering".
In the Joomla! 3.2 from the Global Configuration, click on the Text Filters tab (last one on the right). Check that your users group has "No Filtering" set, see the image below showing the standard test filter settings in 3.2:
When it still doesn't work
Turn off the editor while working on the module, i.e. go to your User profile and set the Editor to "None". Under "Basic Settings" in User Manager:Edit Profile change the Editor option to "None" as shown below:
That way if you have "No Filtering" set, and no editor set you will be dealing with just the text being stored in the database and there will be nothing between you and the database to change it.
If you are trying to add some HTML or Script elements inside module or Article,
Joomla will automatically remove the scripts and tags is that your issue then take a look at below link it may help you.
How to include html or PHP codes into Joomla article
Hope its helps.
I'm using monodevelop on my mac to develop for iPhone. I was wondering if there is a way to change how MD formats C# code? by default it puts the curly braces at the same line as the if which I personally don't like....
In the Solution Options dialog, go to Source Code->Code Formatting->C#. These will cascade to the projects in the solution, but you can override it for individual projects if you want.
You can change the defaults for new solutions in the Default Policies dialog, but this will not affect existing solutions.
Choose Preferences from Edit
Under Text Editor choose Behavior
Uncheck Enable on the fly formatting
You can also create a custom policy, save it to a file, share it with your team (they'll need to import the policy), and then quickly select it from Solution Options.