- Add an instance of the
Double Content
widget to an area. - Add an
Image
to one of the newly instantiated areas. (should work fine) - Edit the
Double Content
widget, saving changes (no actual editing options should be shown) - Repeat step 2. (should now tell you
You were unable to take control of the document
) - Cry softly.
- Refresh page and attempt to add another
Image
as in Step 2 (should work again, till you try to editDouble Content
again.)
Last active
June 12, 2018 18:18
-
-
Save GoodNovember/ad2600c829bfa405bdf2d94a100f80b0 to your computer and use it in GitHub Desktop.
Sample code for Apostrophe CMS which illustrates the 'You were unable to take control of the document'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
extend: 'apostrophe-widgets', | |
label: 'Double Content', | |
skipInitialModal: true, //changed to allow changing of settings of the content via modal | |
addFields: [ | |
{ | |
name: 'areaLeft', | |
type: 'area', | |
label: 'Left Area', | |
contextual: true // added to remove editing via edit modal | |
}, | |
{ | |
name: 'areaRight', | |
type: 'area', | |
label: 'Right Area', | |
contextual: true // added to remove editing via edit modal | |
} | |
] | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="two-column"> | |
<div class="column-left"> | |
{{ apos.area(data.widget, 'areaLeft', { | |
widgets: { | |
'apostrophe-images': {} | |
} | |
}) }} | |
</div> | |
<div class="column-right"> | |
{{ apos.area(data.widget, 'areaRight', { | |
widgets: { | |
'apostrophe-images': {} | |
} | |
}) }} | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment