Giter VIP home page Giter VIP logo

apostrophe-editor-2's Issues

Controls go away and do not come back

  1. Create two text blocks (two separate items added with "add content")
  2. Switch back to editing the first one
  3. The controls for the second rich text item are gone. Not just the ckeditor controls (which makes sense) but the editor-2 controls. They fail to come back when the ckeditor controls are hidden.

When adding widgets to an area, seem to nest inside each other

Often when adding a widget to an area, it will add a duplicates of itself into other widgets in the same area.

To reproduce:

  1. create an area with multiple widget/item types available (mine had events, map, and rich text)
  2. add an events widget with 1 item in it
  3. add a map widget with 1 item in it
  4. add another events widget with 1 item of it

You should see a duplicate of this second events widget appear nested inside of the map widget. If not, keep adding widgets. It will happen eventually, I swear!

Can't include CKeditor plugin

Hi!
I can't include plugin for CKeditor.

I have next settings:

'apostrophe-editor-2': {
    plugins: [
            { name: 'panelbutton', path: '/editor/plugins/panelbutton/' },
            { name: 'colorbutton', path: '/editor/plugins/colorbutton/' }
        ]
    },

plugins folders is placed in public directory 'public/editor/plugins/.....'

in aposArea next options

{{ aposArea(page, 'advt1', {controls: ['colorbutton']}) }}

but without results.

Help me please to decide this problem

Thanks!

Editor stripping iframes

I imported a bunch of blog posts from Wordpress that have iframe embeds in them (for videos). They appear fine in apostrophe, but when i click on the editor, they all get stripped away. I set

sanitizeHtml: {
    allowedAttributes: false,
    allowedTags: false,
  },

in app.js and also set allowedContent: true like this:

'apostrophe-editor-2': {
      plugins: [
        { name: 'autocorrect', path: '/editor/plugins/autocorrect/' }
      ],
      config: {
        allowedContent: true
      }
    }

But nothing is working. Am I right in thinking that this is a CKEditor issue?

Need a friendlier UI for rolling back changes at the area level

You can undo any change via Page Versions, but this is not the friendliest way to bring back that widget you just removed.

We could override the undo/redo keys, in which case we're taking over responsibility for that from ckeditor, which normally does a fine job, but only for the current text editor, not for widgets.

Or we could provide a separate undo/redo mechanism which would leverage the page version history and thus be able to undo widget deletes and the like.

Error - node_modules/moog/index.js:317 if (key.substr(0, 2) === '__') {

When I add 'apostrophe-editor-2': { } into my app.js after 'apostrophe-ui-2': { } I get this error.

Any ideas?

node app.js
WARNING: No session secret provided, please set the `secret` property of the `session` property of the apostrophe-express module in app.js
WARNING: no versions of the script editor exist, but you are pushing that asset in the apostrophe-global module.
WARNING: no versions of the stylesheet user exist, but you are pushing that asset in the apostrophe-global module.
/node_modules/moog/index.js:317
          if (key.substr(0, 2) === '__') {
                  ^

TypeError: key.substr is not a function
    node_modules/moog/index.js:317:19
    at Function.forEach (node_modules/moog/node_modules/lodash/dist/lodash.js:3298:15)
    at applyOptions (node_modules/moog/index.js:313:11)
node_modules/moog/index.js:230:15
    at iterate (node_modules/moog/node_modules/async/lib/async.js:146:13)
    at Immediate.<anonymous> (node_modules/moog/node_modules/async/lib/async.js:157:25)
    at runCallback (timers.js:666:20)
    at tryOnImmediate (timers.js:639:5)
    at processImmediate [as _immediateCallback] (timers.js:611:5)
[9]+  Killed: 9               node app.js

My app.js looks:

var apos = require('apostrophe')({
  shortName: 'xxx',
  title: 'xxx',

  // These are the modules we want to bring into the project.
  modules: {
    // This configures the apostrophe-users module to add an admin-level
    // group by default
    'apostrophe-users': {
      groups: [
        {
          title: 'guest',
          permissions: [ ]
        },
        {
          title: 'admin',
          permissions: [ 'admin' ]
        }
      ]
    },
    // This configures the apostrophe-assets module to push a 'site.less'
    // stylesheet by default
    'apostrophe-assets': {
      stylesheets: [
          {
            name: 'site'
          },
          {
            name: 'bootstrap'
          }

      ]
    },
    // Add your modules and their respective configuration here!

      'apostrophe-ui-2': { },
      'apostrophe-editor-2': { }

}

});

Thanks!

Do we have options to set limits on widgets?

If I want my editors to be able to add event widgets (for example) to an area but only want to allow ONE item per widget, can I define the limit of that widget programmatically as opposed to letting the user choose?

Add Content button should appear on bottom of area aswell

Hey guys

I'm fiddling around with apostrophe now, and I found a pretty annoying thing:
The "Add content" button is just at the top of an area (let's say a new blog post). While this is not an issue, the problem with inserting new content is that it gets inserted at the top. So while I'm writing a new blogpost, every new image or every new text element that I insert, has to be moved to the bottom.

IMO it would be more useful to the user to either:
Add Content button at the bottom, which inserts the content at the bottom
or
Add content at the bottom by default

I made a screenshot with the demo.apostrophenow.org page :-)

https://dl.dropboxusercontent.com/spa/agn3r6rkwi4rxn7/my31q67q.png

Would that be possible?
Cheers
Chris

Too many page versions

Right now we save a version of the entire page every 5 seconds if any changes have been made. This can lead to a very large database.

We can address it by pruning out consecutive versions by the same author less than X minutes apart, once they are Y hours old.

We need to stop storing diffs and start generating them dynamically in order for the removal of intervening versions to still result in reasonable-looking diffs.

Styles not being saved?

I have the following area set up:

{{ aposArea(page, 'header2', {
                    textOnly: true,
                    controls: [ 'style', 'bold', 'italic' ],
                    styles: [
                      { element: 'h2', label: 'Heading 2' },
                      { element: 'h3', label: 'Heading 3' }
                    ]
                  }) }}

I select the "h2" style, and it looks correct. Once I save and go back to that page - I no longer see the "h2" element, but a "p" element encompassing my content.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.