I use page break to ento many pages into the editor, but I do not know how to split them into an array so I can display them to the user one page by one, using Previous and Next Button
Can anyone help please or is there another way to get each page one by one entered in the editor using page break ?
Can anyone help please or is there another way to get each page one by one entered in the editor using page break ?
Re: Split text into an array by using page break as delimite
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Re: Split text into an array by using page break as delimite
Hi mesken,
had the similar idea to use page breaks to split the content of ckeditor into parts ("chapters"). wondering if you had any luck with it. i'd like also to add the some "title" parameter to be able to add "chapter names" to the content parts.
thank you in advance
krajicek
Re: Split text into an array by using page break as delimite
got some partial success with this.
created a plugin which has its own button on toolbar. when it is clicked it opens a dialog window with input field asking for chapter title. when OK button is clicked it creates HR element as chapters delimiter. its 'name' & 'title' attributes are set to entered chapter title.
so far so good. i succeeded to make work also editing of already existing HR delimiter tags.
what i'd like to do next is "automatic chapter titles" which will offer pre-defined chapter titles (e.g. "ch1", "ch2" etc. or "page1", "page2" etc.) which can user accept or overwrite it with his own title.
my idea was to have hidden input field which will hold number of existing chapters. this i will increment when creating new chapter delimiter.
but i have a problem that user can simply select and delete the chapter delimiter HR. or even do the same via Source mode.
is it possible somehow to handle these cases?
thank you in advance for any advice that moves me forward
be well
kr