Is it possible to manage multiple sessions with tinymce - javascript

I am using TinyMCE 4 for my project and I'm trying use it for editing multiple files in the same time. I'm using setContent when I'm loading files. But I want each file to have it's own undo history.
I'm not sure if I'm able to explain. Let's say I have 3 files
a.html
b.html
c.html
I'm loading each files content when user click on their name using setContent to TinyMCE. But I want them to jump back and forward in between files while each one having it's own undo history. I also want it to remember where was selected and where was the keyboard pointer last time.
Thank you.

I had to start seperate tinymce editors. And after showing and hiding active one using
tinymce.get(inactiveid).hide();
tinymce.get(activeid).show();

Related

How do I make specific inputs go into another .html file in the project?

I wanted to make specific inputs go into another part of a site (e.g. https://myexamplesite.com/anotherpartofit.html)
And also make those specific inputs be the ones that someone saved it in.
An example of what I think would work is: Get value from input 1 from /apartofit.html and put it in input 2 at /anotherpartofit.html and make it non-editable
If it needs to use a database, I would prefer if you could help me with firebase (Google's Database). But in my knowlege, it probably needs to use javascript, so I'll be tagging it, if it doesn't, let me know!
in visual studio or notepad or every offline web creating spaces you can't but if you buy a domain or simple , online site , you have to crate a page and get the link of that page then open another page create a button set the button's href to link of pervious page finally hit the button !

JavaScript DOM WYSIWYG editor allowing editing of third party site and recording of edits

CONTEXT
I am building an app that loads a third party website within an iframe, through a proxy in order to allow changes to be made to the website. Because of the proxy, I am able to inject JS code into the website, allowing an element selector to be present within it (i.e. something like this: http://jsfiddle.net/rFc8E/)
PROBLEM
My next step is to enable the user to not only select components but to be able to edit them. So, for example, I would be able to select text, type in new text, click save, and then have the selector -> content change values be stored somewhere on my app. This has been accomplished by others, as described here: How does Optimizely & Visual Website Optimizer handle visual DOM editing?.
However, I'm not sure how step 3 is accomplished:
Our user at this point can make changes to the page, like modifying text, swapping out images, or moving elements around. Each change that is made with the editor is encoded as a line of JavaScript that looks something like the following:
$j("img#hplogo").css({"width":254, "height":112});
|__IDENTIFIER__||____________ACTION______________|
Could someone point me in the right direction?

Changing CSS with JS and saving change

I am creating a page that lets the user chose colours and various elements on the page will adopt the new colour. For example boxes to show the colour scheme selected. I've been using the code $('').css('background_colour',.....) and it works great.
The problem I have now is I made an example webpage which should use these various colours in the relevant sections of the page. For example, main text, background colour, etc. I can't use what I have been doing because none of the changes save and when I click the link that opens the example page it only shows the original colours I put in its CSS file. I figured the method I'm using doesn't isn't actually rewritting the CSS file because when I reload the page where the user selects colours every goes back to default.
If anyone can point me to places to read or suggest the best approach to changing the CSS file that is for a different page AND allows for those changes to be saved I would really help me out.
Hope my description makes sense
Thanks
You can use either cookies or html5 localstorage to store client preferences for your website.
It's plenty of different libraries on the Internet which can help you in this task.
Cookies libraries
https://code.google.com/p/cookies/
https://github.com/ScottHamper/Cookies
Localstorage library
http://www.jstorage.info/
I would suggest cookies if you need to read user preferences from your server side.
Otherwise you can go for localstorage.
if you want to use colors in relevant pages, you have to save your color change events in database or in sessions or in cookies.
Otherwise you can not save changes. Because web page is rendered again when you refresh the page.

Selected Image downloading using Javascript/jQuery

I have an application which creates custom images in the backend. Stores the link in a db table and then they are showed on a UI with checkboes attached to each of them.Now i want the user to be able to click on a download button and then all the images whose checkboxes are selected should get download (and not rendered) in one of the two ways possible
1.) create a zip file of selected and then download(future scope)
2.) download all images individually one by one.
below is my html code
<div class="span5" data-type="collage-image-structure">
<input type="checkbox" class="images_checkbox" data-url="some_url_of_image.png" checked="checked or unchecked">
<img src="some_url_of_image.png">
</div>
Now on click of a button I want download images that are checked. I have tried the iframe solution provided that i read somewhere on stackoverflow(sorry i cant find the link right now). The solution downloads the image in an empty iframe but does not show the download popup as traditional browsers. Also providing a link in the tag and using the download attribute solves things but i dont want to attach an tag to every image. All i want is to write a javascript function that will pass image_urls one by one and download them.Also i do not want to use any readymade plugins available to avoid the overhead of loading the jS file everytime with page load.Please help I need a solution quickly.

How to create a local HTML page in phone gap

I am doing the application in phone gap,But I have a problem that for switching the view,I dont know how to create a another view. But when I google it I get some relevant informaion like, I have create a local html file and then using the htmlcode i can switch the view.
If any one is having any relevant information regarding this please give me some idea.
My method for doing this is using ajax to load in my other pages. Essentially I have multiple html files and my main UI. When a button is clicked I fire an ajax request to load that new page and then animate it in using CSS animations ( which get hardware accelerated ).
remember to load the new page's data into a container div, so the rest of your UI can stay put.
You can create a separate HTML file for a separate view and use JQuery for functionality. Suppose that when you click on button, just redirect to another HTML file or whatever your need is.

Categories