Is their a technique to create and delete content with Aloha? - aloha-editor

I understand how the Aloha editor works, users click on some content in a live web page, edit it and save the content to a repository via ajax. This is fine for content editing, the U in CRUD.
But how do you get the *C*reate and *D*elete in CRUD?
Imagine this scenario.
A web page displays a list of people with first and last names.
They can be edited with Aloha, no problem.
But how do you add a new person in the list via the Aloha editor?
Since it is only for editing content, you can't add new content.
Similarly for content deletion, how do you delete a person from the front end, I mean completely remove the database row for that person somehow, not just put in a blank for their name.
Is their a technique or plugin for this?

you are completely right that Aloha Editor is a WYSIWYG Editor for editing content, meaning that the user can change the DOM in the browser. The actual CRUD operations have to be done by the application that uses the Aloha Editor.
To create new content, you could just add a div via jQuery and make it editable via Aloha. You can then trigger an Ajax request, that saves/creates the new item in the backend.
Same goes for deleting items. You just add a button that triggers an Ajax call to delete the item in the backend.
BR,
Chris

Related

Annotating or fetching selected text content using React

I'm trying to build a chrome extension using React and I could not figure out how I can get selected web content into my extension app. I am going to use it for creating annotations on the web content.
To give an example, User visits a web page, selects a text or whole paragraph and the extension will be able to get the content of selected text. I am going to highlight the text and show the user comment then. (e.g. medium.com's annotation model)
I've tried AnnotatorJS but I cannot annotate the content outside of my application context.
What can be the accurate way for implementing annotations in React?

Best practice to handle extjs refresh page

I wrote an ExtJS application like this:
the sub menu is dynamic added by clicking the button on the left.
The question is :
as the sub panel is created dynamically, so if I refresh the whole page, the panel will go away.
What I expected is it could still display the same content before refresh pages.
So, my question is how to handle this in ExtJS?
Do I need to record the current panel information into Ext.App?
ExtJS is a framework to build Web Applications that run inside the browser.
With Web Applications, just like normal applications, you don't close the program and start it anew (like a browser refresh does) just because someone wants to switch to a different toolbar or look at different data. You work with multiple panels, switch between them, and/or open windows.
You could for instance generate multiple panels inside a container with card layout, and bring to front the panel that you want to show right now.
If you have a license that allows you to use Sencha Architect, there is a nice "navigation" sample available in Architect from where you can start and look at how it's done.

How to get Users List on button click instead of directly?

I am trying to develop one application template from Google search in my local system-using or git, here we are displaying the Users list normally, but how can I get/list the same users list on button click instead of getting directly displaying on UI. Is there any configuration is required to integrate with service/controller with html form button ? Please help me and thanks in advance.

angularjs no effect in ascx page

I have web application with master page and content pages. Inside content aspx page I am trying to open a model popup user control ascx page using Ajax ModalPopupExtender.
Inside ascx user control trying to bind data from database using AngularJS.
Initially when I open the user control page, table/grid is not displaying any data.
Using Developer tools IE/Crome when I reload the page, next time it shows the data.
I think DOM is not getting updated in the first display, how can I solve this problem.
Thanks,
Ali

dotnetnuke hide menu from page

I'm running a dotnetnuke project (v7.0) with 2 portals.
I need to remove the default DDR menu from one page only.
The menu works great now with multiple pages and sub-pages, however on 1 specific page , ie landing page, I don't want to show the menu.
Right now I can think of 2 methods for achieving this:
Create a new skin template, remove menu, apply template to that one page
Use jquery to detect URL, for that page hide menu.
I'd rather just code the logic inside the template file, but I'm not strong in .net/c# and I'm new to DNN.
It's just one page today.
However, if you are using it for a landing page design I would recommend you just create another skin and exclude it from that and tailor that skin for that need.
That way when your non-technical editors need to work on the site and make a page that might only be used when linking from Google Adwords or whatever they can pick a template without that navigation and you as the developer/designer don't need to edit the skin to put in another exception based on the URL.

Resources