mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-25 12:21:58 +00:00
Compare commits
6 Commits
950f42543a
...
3048fb47d4
| Author | SHA1 | Date | |
|---|---|---|---|
| 3048fb47d4 | |||
| b13677d830 | |||
| 7a5663e044 | |||
| a509694d6c | |||
| 5f1242b766 | |||
| 977b04afb9 |
@ -133,7 +133,7 @@ var getCharOffset = function(elem, x, y, data){
|
|||||||
// markdown: '# Hea|ding'
|
// markdown: '# Hea|ding'
|
||||||
//
|
//
|
||||||
// XXX we are not checking both lengths of markdown AND text...
|
// XXX we are not checking both lengths of markdown AND text...
|
||||||
/*/ XXX
|
// XXX
|
||||||
var getMarkdownOffset = function(markdown, text, i){
|
var getMarkdownOffset = function(markdown, text, i){
|
||||||
i = i ?? text.length
|
i = i ?? text.length
|
||||||
var m = 0
|
var m = 0
|
||||||
@ -158,6 +158,7 @@ var getMarkdownOffset = function(markdown, text, i){
|
|||||||
// chars in text can lead to false positives and lots of potential
|
// chars in text can lead to false positives and lots of potential
|
||||||
// (not implemented) backtracking...
|
// (not implemented) backtracking...
|
||||||
// ...needs thought...
|
// ...needs thought...
|
||||||
|
// Q: can we cheat with this? =)
|
||||||
var getMarkdownOffset = function(markdown, text, i){
|
var getMarkdownOffset = function(markdown, text, i){
|
||||||
i = i ?? text.length
|
i = i ?? text.length
|
||||||
var map = []
|
var map = []
|
||||||
|
|||||||
@ -68,6 +68,8 @@ var setup = function(){
|
|||||||
this returns `69` while it should return `5`
|
this returns `69` while it should return `5`
|
||||||
_...replacing `\n\n\n` with `\n\n` seems to fix the issue (also works with spaces)_
|
_...replacing `\n\n\n` with `\n\n` seems to fix the issue (also works with spaces)_
|
||||||
(BUG also the above line is not italic -- can't reproduce)
|
(BUG also the above line is not italic -- can't reproduce)
|
||||||
|
- clicking right of the last line places cursor wrong
|
||||||
|
- _this is a problem with the new version of `getMarkdownOffset(..)`_
|
||||||
- DONE M
|
- DONE M
|
||||||
M can't place cursor before first char
|
M can't place cursor before first char
|
||||||
M
|
M
|
||||||
@ -102,6 +104,30 @@ var setup = function(){
|
|||||||
-
|
-
|
||||||
- ## ToDo:
|
- ## ToDo:
|
||||||
- Q: can we place a cursor in a table correctly???
|
- Q: can we place a cursor in a table correctly???
|
||||||
|
- Q: should tables be text-based markdown or higher-level?
|
||||||
|
- block-based -- adjacent blocks in table format (a-la markdown) are treated as rows of one table...
|
||||||
|
- here is an example
|
||||||
|
- | col 1 | col 2 | col 3 |
|
||||||
|
- | A | B | B |
|
||||||
|
- | 1 | 2 | 3 |
|
||||||
|
-
|
||||||
|
- not yet sure how are we going to allign columns (CSS preffered)
|
||||||
|
- block-children -- similar to how lists are done now
|
||||||
|
- a demo
|
||||||
|
- table-marker
|
||||||
|
- | A | B | B |
|
||||||
|
- | 1 | 2 | 3 |
|
||||||
|
- | X | Y | Z |
|
||||||
|
-
|
||||||
|
- the header may be used as::
|
||||||
|
- header row
|
||||||
|
- caption text
|
||||||
|
- both?
|
||||||
|
- see CSS grids + `display: contents` (might help hide non-grid elemnts...
|
||||||
|
-
|
||||||
|
- might be fun to make the general syntax (with "=" removed) to be compatible with markdown...
|
||||||
|
- might also be fun to auto-generat (template) new blocks within a table...
|
||||||
|
- this would greatly simplify table navigation and creation
|
||||||
- custom element / web component
|
- custom element / web component
|
||||||
- BUG: select via double/triple clicks does not work...
|
- BUG: select via double/triple clicks does not work...
|
||||||
- _looks like something is refocusing the element..._
|
- _looks like something is refocusing the element..._
|
||||||
@ -492,7 +518,7 @@ var setup = function(){
|
|||||||
<button onclick="editor.dom.classList.toggle('block-offsets')">show/hide block offsets</button>
|
<button onclick="editor.dom.classList.toggle('block-offsets')">show/hide block offsets</button>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
@ -505,7 +531,6 @@ var setup = function(){
|
|||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<!-- XXX this is broken... -->
|
|
||||||
<outline-editor>
|
<outline-editor>
|
||||||
<textarea>- ## code enclosed in `<textarea>` element
|
<textarea>- ## code enclosed in `<textarea>` element
|
||||||
- code is treated as-is
|
- code is treated as-is
|
||||||
@ -526,6 +551,7 @@ var setup = function(){
|
|||||||
- default value, edit to change
|
- default value, edit to change
|
||||||
- this should survive reloads"></outline-editor>
|
- this should survive reloads"></outline-editor>
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user